Querying and downloading models and metadata
How collaborators and applications can access models and metadata stored in the registry
By initializing a Model or Model version object, you can query and download metadata and files stored for that model or version.
Use the Neptune id and available methods to fetch what you need.

Example: Downloading a model signature, if it exists

1
import neptune.new as neptune
2
3
model = neptune.init_model(model="MODEL_ID")
4
5
if model.exists("model/signature"):
6
model["model/signature"].download()
Copied!
where MODEL_ID is the id of the model. For example, PROJ-MOD.
The Neptune id of any object is stored in the sys/id field.

Example: Listing all versions of a model

1
import neptune.new as neptune
2
3
model = neptune.init_model(model="MODEL_ID")
4
5
model_versions_df = model.fetch_model_versions_table().to_pandas()
Copied!
where MODEL_ID is the id of the model. For example, PROJ-MOD.

Example: Fetching validation metrics of a model version

1
import neptune.new as neptune
2
3
model_version = neptune.init_model_version(version="MODEL_VERSION_ID")
4
5
val_metrics = model_version["validation/metrics"].fetch()
Copied!
where MODEL_VERSION_ID is the id of the model version. For example, PROJ-MOD-9.

Difference between model and run

The available methods for run and model objects are the same, with the following notable exceptions:
  • fetch_model_versions_table() -> available for model objects
  • change_stage() -> available for model version objects

API reference pages