Skip to content

Runs vs Model registry - Which one to use#

Main aspects to consider#

Organization: Do you want the metadata organized...

Runs section: Each entry represents an experiment.

Table view with runs

Models section: Each entry represents a model. Each model can have multiple versions (pictured).

Table view with model verions

App features: Runs come with rich comparison and visualization support, whereas model objects are designed around versioning and lifecycle management.

Behavior during execution: Runs automatically attempt to track more background and project information. Model objects only capture minimal environment information; the rest is user-defined.

Similarities and differences#

Feature Runs Models Model versions
Log metadata in user-defined structure ✅ ✅ ✅
Table view with customizable columns ✅ ✅ ✅
Multiple table views ✅ ❌ ❌
Background monitoring during execution ✅ ❌ ❌
Advanced tracking of Git info and dependencies ✅ ❌ ❌
Comparison ✅ ❌ ❌
Dashboards ✅ ❌ ❌
Custom name and description ✅ ✅ ✅
Tags ✅ ✅ ✅
Stage management ❌ ❌ ✅
Create in code ✅ ✅ ✅
Create in app ❌ ✅ ❌

To learn more about Neptune objects, see Neptune objects overview.

How it works in the code#

Creating runs#

The below code creates a run in your Neptune project. Run objects can contain any metadata you want to track, plus some automatically logged system metrics.

Sample code
run = neptune.init_run()
run["params"] = {"lr": 0.01, "batch_size": 64, "activation": "ReLU"}
run["data/sample"].upload("datasets/sample.csv")
...
run.stop()

You can customize the behavior and tracking through init_run() arguments.

Once the run is stopped, you get a link to the run in the Neptune app.

Creating model objects#

Register a model once, then create as many versions as you need.

Just like with runs, you can create new model objects or resume existing ones, and store metadata in a structure of your choosing.

Registering a model
model = neptune.init_model(key="FOREST")
model["signature"].upload("model_signature.json")
Creating a new model version
model_version = neptune.init_model_version(model="CLS-FOREST")
model_version["model/binary"].upload("model.pt")
model_version.change_stage("production")

Usage with integrations#

Neptune integrations only use runs and do not natively access the model registry.

However, you can set up your code to use both runs and model objects in conjunction. For an example use case, see Text classification using Keras .

Open example notebook in Colab 


Related