Register a model#
For each ML model that you're working with, you can create a model object in Neptune and track any related metadata.
See example models in Neptune  Browse code examples 
Creating a Model object#
The Model
object is suitable for storing general metadata that is shared by all versions of the model. For example:
- Model signature
- Validation datasets
- Description of model's purpose
Create model through API#
Import Neptune and call the init_model()
function:
import neptune
model = neptune.init_model(
key="MODEL_KEY", # must be uppercase and unique within the project
name="A name for your model", # optional
)
Alternatively, you can use the class constructor:
To see the model in Neptune, navigate to the Models section of your project.
Create model in app#
- In the Models section of your project, click Create new model.
- Enter a key and optionally a name and description for your model.
Now you can log metadata to the model in your Python code.
How do I find the ID?
The Neptune ID is a unique identifier for the object. It's shown in the leftmost column of the table view.
The ID is stored in the system namespace, in the "sys/id"
field.
Logging metadata to the model#
Track model metadata by assigning them to the model
object:
Upload the model signature and other data with the upload()
method:
Track dataset versions with the track_files()
method:
model["data/train"].track_files("data/train.csv")
model["data/validation/dataset/v0.1"].track_files("s3://datasets/validation")
To stop the connection to Neptune and sync all data, call the stop()
method and execute the script or cell:
To see the model in Neptune, click the link in the console output.