Model Metadata Store

Storage, APIs, and UI for managing model metadata

Seldon Deploy provides a storage solution for model’s metadata since v1.2. It allows model information to be stored and referenced in Seldon Deploy.

The model metadata is stored in Postgres, which can be part of the Kubernetes cluster, or a managed solution. For more information on how to setup the Postgres configuration in Seldon Deploy see the instructions.

Seldon Deploy watches for changes to the cluster and keeps track of what models are used in what deployments. You can access this data from the API using the /api/v1alpha1/model/metadata/runtime. In future releases we will make this information available through the UI as well allowing filtering deployments by model metadata.

Seldon Deploy also prepopulates basic model information for all models already running in the cluster that are not yet registered in the Model Store.

Querying model metadata

Making queries

Seldon Deploy provides an advanced query language that allows you to make sophisticated search queries over your models.

Fields can be compared using the following operators: =, !=, >=, <=, <, >, and multiple queries can be combined using AND, OR.

For example you can search for all models with the name iris and version 2.0 with a query like this:

name=iris AND version=2.0

More advanced queries can be built up using bracketed expressions:

(name=iris AND version=2.0) OR version=3.0

Note that since the version field is a string, the >=, <=, <, > operators are alphabetical comparisons, not numeric ones.

Querying for tags and metrics

You can query for models that have specific metrics or tags by using the following syntax:

metrics[metricName]>1.0 AND tags[tagKey]!=someValue

Queries using the API

Using the model metadata API you can specify a string query (the same way you would in the UI) which takes precedence over other fields set in the API.

<yourSeldonDomain>/seldon-deploy​/api​/v1alpha1​/model​/metadata?query=(version=1.0)

Valid query field names and values

Field Names

Valid Values

URI

string

Name

string

Version

string

Project

string

Artifact_type

one of CUSTOM, TENSORFLOW, SKLEARN, XGBOOST, MLFLOW, PYTORCH, ONNX, TENSORRT

Task_type

string

Tags

tags[tag_name]=tag_value (string data)

Metrics

metrics[metric_name]=metric_value (numeric data)

Note that the field names are case insensitive.