Skip to main content
App version: 3.4.12

Construct Neptune URLs

To get the URL for a Run object, use one of the built-in methods:

You can also manually construct Neptune app URLs based on run or experiment properties.

The examples in this guide use the following basic URL structure:

https://{NeptuneServerUrl}/o/{Workspace}/{Project}/...

where

  • {NeptuneServerUrl} is the URL to your Neptune server. For SaaS users, it's scale.neptune.ai.
  • {Workspace} is your Neptune workspace name.
  • {Project} is your Neptune project name.

Construct experiment URL

If a new run becomes the head of an experiment, Neptune automatically switches to visualizing the new run in the web app.

To construct a URL that opens the run for a given experiment:

  1. Navigate to the app section that the URL should open.

  2. In the URL, set runIdentificationKey to the experiment name:

    https://{NeptuneServerUrl}/o/{Workspace}/{Project}/runs/details?...&runIdentificationKey={ExperimentName}&type=experiment

    where {ExperimentName} is the name passed to the experiment_name argument at run creation. It's displayed in the Name column of the runs table.

Example: https://scale.neptune.ai/o/neptune/org/LLM-training-example/runs/details?viewId=standard-view&runIdentificationKey=long_YFP0TJYE_d_0.99999_f_0.15_n_100&type=experiment

Construct run URL

To construct a URL that opens a particular run, use the following schema:

https://{NeptuneServerUrl}/o/{Workspace}/{Project}/-/run/?customId={CustomRunID}

where {CustomRunID} is the identifier you pass to run_id at initialization. It's stored in the sys/custom_run_id attribute.

Example: https://scale.neptune.ai/o/neptune/org/LLM-training-example/-/run/?customId=QFEKX7LGHW

Point URL to specific tab

To target a specific tab in the focused run view, append:

&detailsTab={TabName}

where {TabName} is one of the following:

  • attributesAttributes tab
  • chartsCharts tab
  • dashboardDashboards tab

Example: https://scale.neptune.ai/o/neptune/org/LLM-training-example/-/run/?customId=QFEKX7LGHW&detailsTab=charts

Construct URL to compare experiments

To generate a filtered view of specific experiments, create a dynamic URL based on a regular expression.

Use the following structure:

https://{NeptuneServerUrl}/o/{Workspace}/{Project}/runs/compare?viewId=standard-view&dash=charts&nameSearchQuery={UrlEncodedRegexSearchQuery}&nameSearchMode=regex&lbViewUnpacked=true

where {UrlEncodedRegexSearchQuery} is a URL-safe encoded regex. For example, if querying two experiments short_name|test_head, the query will be short_name%7Ctest_head.

Example: https://scale.neptune.ai/o/neptune/org/LLM-training-example/runs/compare?viewId=standard-view&nameSearchQuery=4ZV_d_0.999%7C4ZV_d_0.998&nameSearchMode=regex&lbViewUnpacked=true

note

To search among all runs and not just experiment heads, append &experimentsOnly=false to the URL.

Construct URL for filtered view

To create a URL that leads you to a filtered table view, use the query parameter:

https://{NeptuneServerUrl}/o/{Workspace}/{Project}/runs/table?viewId=standard-view&query=(...)

For example, to see all runs with the trial tag:

query=((%60sys%2Ftags%60%3AstringSet%20CONTAINS%20%22trial%22))

To see all runs with either the trial or script tag:

query=((%60sys%2Ftags%60%3AstringSet%20CONTAINS%20%22trial%22)%20OR%20(%60sys%2Ftags%60%3AstringSet%20CONTAINS%20%22script%22))

To see all runs with both the trial and script tags:

query=((%60sys%2Ftags%60%3AstringSet%20CONTAINS%20%22trial%22)%20AND%20(%60sys%2Ftags%60%3AstringSet%20CONTAINS%20%22script%22))

Example link: https://scale.neptune.ai/o/neptune/org/LLM-training-example/runs/table?viewId=standard-view&query=((%60sys%2Ftags%60%3AstringSet%20CONTAINS%20%22large%22))

Construct URL in code

If you have the custom run ID set to run_id and the project path set to the NEPTUNE_PROJECT environment variable, you can generate the URL as follows:

import os


print(
f"https://scale.neptune.ai/{os.getenv('NEPTUNE_PROJECT')}/-/run/?customId={run_id}"
)

You can also replace {os.getenv('NEPTUNE_PROJECT')} with the full project path:

f"https://scale.neptune.ai/my-workspace/my-project/-/run/?customId={run_id}"