Add a new field to existing runs#
If you've already logged a set of runs and would like to introduce new fields, you can automate it by fetching runs from your project programmatically.
The below script illustrates how to obtain the run IDs as a list, then resume the runs one by one.
import neptune with neptune.init_project(project="ml-team/xnlu") as project: # (1)! runs_table_df = project.fetch_runs_table().to_pandas() # (2)! run_ids = runs_table_df["sys/id"].to_list() for run_id in run_ids: with neptune.init_run(with_id=run_id) as run: # (3)! # some criteria for the new field or value run["some_new_field"] = some_value
- Initialize your project with
neptune.init_project()to get a
Projectobject that you can operate on.
projectobject to get a list of run IDs. You can filter the runs by state, owner, or tags.
- Use the IDs to resume each run and modify its metadata.
Depending on the fields you want to introduce, you can implement some checks or other criteria in order to determine what metadata to assign to the run.
Fetching the runs individually#
You reinitialize any one run as follows:
RUN-ID is the identifier of some existing run.
How do I find the ID?
You can grab the ID manually from the Runs table. It's displayed in the leftmost column.
The ID is stored in the system namespace (
sys/id). If the run is active, you can obtain its ID with
run["sys/id"].fetch(). For example:
Once the run is active, you can log to it normally.