Skip to content

Runs in Neptune#

View with file previews

A run is the basic container of metadata for each model training experiment.

While active, the run automatically tracks certain system and environment information, as well as any custom metadata you want to log – such as configuration, metrics, artifact versions, or predictions.

The below code creates a run in the specified Neptune project.

Sample code
import neptune

run = neptune.init_run(project="ml-team/nlu")  # (1)!
run["params"] = {"lr": 0.01, "batch_size": 64, "activation": "ReLU"}
run["data/sample"].upload("datasets/sample.csv")

# Your model training code

run.stop()
  1. You can omit this parameter if you set the project name to the NEPTUNE_PROJECT environment variable (recommended).

    export NEPTUNE_API_TOKEN="h0dHBzOi8aHR0cHM.4kl0jvYh3Kb8...ifQ=="
    
    export NEPTUNE_PROJECT="ml-team/classification"
    
    export NEPTUNE_API_TOKEN="h0dHBzOi8aHR0cHM.4kl0jvYh3Kb8...ifQ=="
    
    export NEPTUNE_PROJECT="ml-team/classification"
    
    setx NEPTUNE_API_TOKEN "h0dHBzOi8aHR0cHM.4kl0jvYh3Kb8...ifQ=="
    
    setx NEPTUNE_PROJECT "ml-team/classification"
    

    You can also navigate to SettingsEdit the system environment variables and add the variables there.

    %env NEPTUNE_API_TOKEN="h0dHBzOi8aHR0cHM.4kl0jvYh3Kb8...ifQ=="
    
    %env NEPTUNE_PROJECT="ml-team/classification"
    

Once the run is stopped, Neptune synchronizes all of the data with the servers and prints a link to the app.

See example run in Neptune 

Browsing all metadata of a run#

All metadata of a run

The metadata is stored in a folder-like structure, with all namespaces and fields exactly as they were logged.

Each run has three automatically generated namespaces:

Namespace     Description
monitoring
  • Hardware consumption metrics, organized into subfolders per process
  • stderr and stdout streams
source_code
  • The code of the executed script
  • Git information
  • Dependencies or requirements
sys The system namespace, which contains basic metadata about the run

Assuming the sample code above, the run metadata structure would be as follows:

run
|-- data/sample
    |-- <CSV file>
|-- monitoring/
    |-- <process id>/
        |-- cpu
        |-- gpu
        |-- ...
|-- params/
    |-- lr
    |-- batch_size
    |-- activation
|-- source_code/
    |-- entrypoint
    |-- files
|-- sys/
    |-- creation_time
    |-- description
    |-- ...

Pre-built tabs#

Each of the tabs are specialized for analyzing a particular kind of metadata.

Tab Keyboard shortcut Description
All metadata 1 Navigate the complete metadata structure and preview fields.
Charts 2 See metrics (such as accuracy or loss) visualized as graphs.
Images 3 Preview and download image objects or series (such as predictions).
Monitoring 4 View system metrics, hardware consumption, and console logs live.
Source code 5 Browse source code, Git info, and dependencies.
Artifacts 6 View version info and other metadata about tracked artifacts.
Dashboards 7 Compose your own view out of customized widgets.

Comparing multiple runs#

Toggle the eye icon ( ) to pick runs for comparison.

Tab Keyboard shortcut Description
Experiments 1 Table of all runs. Customizable, with support for shared views.
Charts 2 Display a given metric across multiple runs.
Side-by-side 3 See field values as rows instead of columns. Useful for contrasting a large number of values at once.
Images 4 Preview an image across multiple runs.
Parallel coordinates 5 Analyze the relationship between hyperparameters and metrics.
Artifacts 6 View version info and other metadata about tracked artifacts.
Dashboards 7 Compose your own view out of customized widgets.

See example dashboard in Neptune 

Note

Dashboards and supported widgets are separate for analyzing a single run versus comparing multiple runs at once.

Editing run details#

Modal with basic run details

The Run information view shows basic metadata about the run itself: time data, size, owner, and descriptive information.

From here, you can:

  • Edit the name and description.
  • Manage tags.
  • Copy the Neptune ID to your clipboard.

To access the view, click the menu next to the run title ( ) and select Run information.