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'sscale.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:
-
Navigate to the app section that the URL should open.
-
In the URL, set
runIdentificationKeyto the experiment name:https://{NeptuneServerUrl}/o/{Workspace}/{Project}/runs/details?...&runIdentificationKey={ExperimentName}&type=experimentwhere
{ExperimentName}is the name passed to theexperiment_nameargument at run creation. It's displayed in the Name column of the runs table.
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:
attributes→ Attributes tabcharts→ Charts tabdashboard→ Dashboards tab
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.
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))
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}"