Request Logging
Prerequisites
Download the installation resources.
Verify the cluster requirements.
Install Seldon Enterprise Platform.
Install Seldon Core 2.
Install Knative Eventing
If you have not installed Istio as your ingress controller, you will not be able to use Knative Eventing and will need to configure Seldon Enterprise Platform accordingly.
Knative Eventing technology is utilized to create an event driven architecture for ML data events logging and is required to log prediction requests for Core V1. See Knative section for installation steps.
Install Elasticsearch Stack
Elasticsearch is the main data storage for various ML data event payloads. Seldon Enterprise Platform does not support OpenSearch as an alternative to Elasticsearch.
Fluentd is used for collecting application logs. Seldon uses an in-house developed component called metronome for storing the event payloads and other data as Elasticsearch documents.
Seldon Core and Enterprise Platform Configuration
For Seldon Core, add the following options to your core-values.yaml
file:
For Seldon Enterprise Platform, add the following options to your install-value.yaml
file:
Metronome
The above configuration for Seldon Enterprise Platform creates a component called Metronome, developed by Seldon. Metronome is a request logger for ML events. Metronome splits out batch payloads and enriches request payloads with additional metadata from the ML prediction schema. This component is also responsible for creating the correct database mappings, define the payload schema and storing inferred feature data.
ML Metadata
Metronome can optionally obtain a prediction schema from the Seldon Enterprise Platform metadata service, if enabled. This can be used to enrich prediction logs (add category name for categorical features and identify probabilistic features) for better logging and advanced monitoring.
To enable this feature, it is necessary to ensure that the Seldon Enterprise Platform instance is configured with a suitable license. Then, follow the steps below:
For more details see the PostgreSQL setup.
Have an OIDC provider configured that supports the client credentials grant flow and enable this on a client for Metronome to use. In some OIDC providers, including Keycloak, setting up a service account is required for the client credentials auth flow. The password grant flow can be used for cases in which a client credentials flow is not supported.
Create an auth secret for the Metronome configuration as below, setting the parameters as per your environment.
Ensure
requestLogger.deployHost
andrequestLogger.authSecret
are set, ininstall-values.yaml
.
If you are not using app-level auth, because you are using ingress-level authentication, skip all the above steps except (1) and set the below in install-values.yaml
:
Authentication on Elasticsearch
The Seldon Enterprise Platform Helm values file has two options for connecting to a secured Elasticsearch database.
One is token-based authentication, which you should use if you have an auth token. This is used for OpenShift cluster logging flavour of Elasticsearch/OpenSearch
The other option is basic authentication. This requires creating a secret with the username and password for the Elasticsearch/OpenSearch database. These steps are described in the Elasticsearch installation documentation.
For Enterprise Platform this would need secrets in the namespaces seldon-logs
(containing Elasticsearch and Metronome) and seldon-system
(containing the Plaform itself) as Enterprise Platform would need to speak to Elasticsearch using the secret.
This could look like:
Running without Knative
Disable Knative Triggers
If you run without Knative, for example because you use an ingress other than Istio, you need to disable Knative Triggers in your install-values.yaml
file:
This will create a deployment of Metronome (Seldon request logger) that can still log payloads from Core v2 pipelines.
Configure Seldon Core
If you just run without Knative, but still use Istio and Seldon Core v1, you need to adjust the Seldon Core Helm installation to not use Knative Eventing for logging. You can do this by setting the following in your core-values.yaml
:
ML data payload parsing
Metronome will try to infer the request and response payloads, parse and insert them into Elasticsearch. If metadata is available in the Seldon Enterprise Platform model catalogue, then this will be used to enrich the payloads. Metronome supports the Seldon v1, TensorFlow, and Open Inference Protocol payloads for the prediction and alibi-detect protocols for outlier/drift detection use cases. In general, Metronome:
Assumes the first dimension of tensor based data is the batch dimension and attempts to split the data into individual request/response entries before storing them in Elasticsearch.
Passes through seldon v1
jsonData
,strData
andbinData
unmodified.
If you're sending image or text data, the default maximum payload of Metronome, which is 300 KB, may not be enough. To change this, you can add the following to your install-values.yaml
:
Last updated