Skip to main content
App version: 3.20250901

Create a run

To create an experiment run, use the Run constructor.

For example, to create a run that belongs to the seabird-flying-skills experiment, use:

from neptune_scale import Run


if __name__ == "__main__":
run = Run(experiment_name="seabird-flying-skills")
  • The name can contain any Unicode character, including /, , ., :, ;, &, and |.

  • The line if __name__ == "__main__": ensures safe importing of the main module. For details, see the Python documentation.

Then, to track experiment metadata, call a logging method on the run object:

for step in epoch:
# your training loop
acc = ...
loss = ...

run.log_metrics(
data={"metrics/accuracy": acc, "metrics/loss": loss},
step=1,
)

For details, see Log metadata.

To get a link to the experiment in the Neptune web app:

run = Run(experiment_name=...)
run.get_experiment_url()

For details, see Construct Neptune URLs.

Set target project

To specify the Neptune project, use the project argument:

run = Run(
experiment_name="seabird-flying-skills",
project="team-alpha/project-x", # replace with your workspace and project name
)

You can also save the project name as an environment variable. For details, see Get started.

Set custom run ID

To override the auto-generated run identifier with a custom one, pass a string to the run_id argument:

run = Run(
experiment_name="seabird-flying-skills",
run_id="astute-kittiwake-23",
)

The custom run ID provided to the run_id argument must be unique within the project. It can't contain the / character.

Pass existing ID

If a run with the ID passed to run_id already exists, Neptune continues logging to that run.

For details, see Resume a run.

What's the difference between sys/id and sys/custom_run_id?
  • sys/custom_run_id is the run identifier you set manually via the run_id argument of the Run constructor. It's auto-generated if not provided.
  • sys/id is a legacy run identifier based on the project key. It will be removed in a future release and can be ignored.

View runs in the app

In the All runs tab, by default, Neptune displays the latest run of each experiment.

To show all runs, switch from Experiments to Runs:

All runs tab in the Neptune app with a highlighted button for switching between all runs and experiment runs.

You can save your table configuration as a custom view, which makes it easier to work on the runs later.