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.

Caution

Using del or pop() on a namespace or field cannot be undone.

  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 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["datasets/dataset_too_large_to_store.csv"]
    

You can also overwrite 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.

Until the trash is emptied, trashed objects remain in the trash and can be restored.

Emptying the trash#

You can permanently delete the objects in the project trash through the app or with the following management functions:

Related