Skip to content

Delete metadata from a run#

You can delete metadata from a run by connection to it in your code, then using del or pop() on the namespaces or fields you wish to delete.

Using del or pop() cannot be undone.

  1. Resume the run and pass its Neptune ID to the with_id argument:

    import neptune
    
    run = neptune.init_run(with_id="CLS-2")
    
    How do I find the ID?

    The Neptune ID is a unique identifier for the run. In the table view, 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:

    >>> run = neptune.init_run(project="ml-team/classification")
    >>> run["sys/id"].fetch()
    'CLS-26'
    
  2. Use del or pop() to delete metadata:

    del run["large_datasets"]
    
    run.pop("large_datasets")
    

Example: Deleting a field from multiple runs#

To remove everything logged in the train/bounding_boxes namespace from particular runs:

run_ids = ["SUN-123", "SUN-124", "SUN-125", ...]
for run_id in run_ids:
    # Resume run
    run = neptune.init_run(with_id=run_id)

    # Delete images in "train/bounding_boxes" namespace
    del run["train/bounding_boxes"]

    # Close the run
    run.stop()

Related