Skip to main content
App version: 3.4.15

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:

Create a run
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.

info

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:

Graphs of run metrics in the Neptune app. Inherited metrics are hidden

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:

Graphs of run metrics in the Neptune app. Inherited metrics are shown for each run.

With the runs table in Experiment mode, the runs that make up the experiment lineage are combined into a single graph:

Graph of an experiment's metrics in the Neptune app.

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

IdentifierHow to set itAuto-generated if not setAttribute that stores it
ExperimentsNameexperiment_name argumentNosys/name
RunsIDrun_id argumentYessys/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.

All metadata of a run displayed in the Neptune app

The below example shows both flat and nested attributes:

Sample code
run.log_configs(
{
"optimizer": "adam",
"parameters/learning_rate": 0.001,
"parameters/batch_size": 64,
},
)
Resulting structure
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.