Runs vs Model registry - Which one to use#
Main aspects to consider:
-
Organization: Do you want the metadata organized
-
per experiment → Runs section
-
or per model? → Models section
-
-
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 | |||
Add and edit object information | |||
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#
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.
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.
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.
model = neptune.init_model(key="FOREST")
model["signature"].upload("model_signature.json")
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
- Create a run
- Register a model
- Create a model version
- Essential logging methods
- API reference ≫
Run
– experiment metadata - API reference ≫
Model
– general model metadata - API reference ≫
ModelVersion
– version-specific model metadata