Runs in Neptune
A run is the basic unit of a model-training experiment. It can contain metadata related to the training, like configs, metrics, predictions, and scores.
The below code creates a Run
and sends it to your current Neptune project:
from neptune_scale import Run
run = Run(experiment_name="seagull-flying-skills")
For details, see Create a run.
Experiments
A Neptune experiment is a lineage of runs with the same name. It expresses an idea that you're interested in exploring, possibly over a large number of restarts and reconfigurations.
To build up an experiment, use forking to create runs at particular steps and retain the metrics history.
In the runs table, experiments are represented by one Run
at a time: the latest one in the lineage. This run is called the experiment head.
Runs versus experiments
The following images show a lineage of runs belonging to the same experiment. The orange run is the experiment head.
With the runs table in Runs mode and inherited metrics disabled, you can see each run separately:
By default, the graph of each run includes metrics that the run inherited when it was forked. In the below image, the previous head run is highlighted, including its metric history:
With the runs table in Experiment mode, the runs that make up the experiment lineage are combined into a single graph:
In this view, the run history that was "overwritten" by the forking is pruned, leaving a single clean line to represent the experiment.
Name versus ID
Identifier | How to set it | Auto-generated if not set | Attribute that stores it | |
---|---|---|---|---|
Experiments | Name | experiment_name argument | No | sys/name |
Runs | ID | run_id argument | Yes | sys/custom_run_id |
Run metadata structure
The metadata is stored in a folder-like structure, with all namespaces and attributes organized as they were logged.
The below example shows both flat and nested attributes:
run.log_configs(
{
"optimizer": "adam",
"parameters/learning_rate": 0.001,
"parameters/batch_size": 64,
},
)
run
|-- optimizer # String attribute with value "adam"
|-- parameters/ # Namespace
|-- learning_rate # Float attribute with value 0.001
|-- batch_size # Int attribute with value 64
When logging dictionaries or other nested data structures, Neptune can do the flattening for you, so that the structure is preserved. For details, see Log nested dictionaries.
Auto-logged metadata
- All runs have a system namespace
sys
, which contains basic information about the run. - By default, the
runtime
namespace tracks console logs.
You can inspect these namespaces in the Attributes tab of a run, and display them in widgets or use them in API queries.
Runs and projects
A run belongs to one project. To compare runs from different projects but the same workspace, create a report.