Skip to main content

Experiments

All runs tab in the Neptune app. The buttons for switching the experiments history on and off are highlighted.

An experiment expresses an idea that you're interested in exploring, possibly over a large number of related model-training runs.

An experiment is represented by one Neptune run at a time. To try multiple variants of an experiment, you can fork or restart it from an existing run.

When exploring metrics in the web app, you can toggle the experiment history on or off. This way, you can focus on the most recent run of an experiment, or if needed, trace the history all the way back to the first ancestor run.

What's the connection between a run and experiment?

In the code, experiments are represented as runs. An experiment run has the experiment name stored in its sys/name attribute.

In the below example, a run is created as the head of the experiment gull-flying-skills:

from neptune_scale import Run

run = Run(
experiment_name="gull-flying-skills",
run_id="vigilant-kittiwake-1",
)

If a new run is created with the same experiment name, it becomes the new representant run for the experiment:

run = Run(
experiment_name="gull-flying-skills",
run_id="vigilant-kittiwake-2",
)

The vigilant-kittiwake-1 run is still accessible as part of the experiment history, but it's no longer considered an experiment.