Skip to content

Trash and delete data#

You can delete pieces of metadata from individual Neptune runs or objects, or trash entire Neptune objects.

Deleting metadata from objects#

You can delete metadata from runs or other Neptune objects by resuming a connection to it in your code and operating on the namespaces or fields you wish to delete.

  1. Resume the object with its init function and the with_id parameter:

    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 object. In the table view, it's displayed in the leftmost column.

    The ID is stored in the system namespace. If the object is active, you can obtain its ID with neptune_object["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["datasets/dataset_too_large_to_store.csv"]
    

You can also override an existing field with something different, as long as it's of the same type.

Related

Trashing objects#

You can trash Neptune runs or other objects:

  • Through the app, by selecting the objects and clicking Trash in the top-right corner.
  • Through the API, with the trash_objects() function.

Trashed items remain in the project trash until manually emptied.

Related

For cleaning junk metadata locally, see neptune clear.