comet-ml / issue-tracking

Questions, Help, and Issues for Comet ML
https://www.comet.ml
85 stars 7 forks source link

Functionality to delete images, artifacts, ... from experiments #475

Closed florianblume closed 1 year ago

florianblume commented 2 years ago

Is your feature request related to a problem? Please describe.

I'd like to be able to delete individual images, artifacts, etc. from experiments either using the UI or through the Python API. Both together would of course be best ;)

For example: I log model weights during training regularly but name them after epoch and loss to be able to recall which checkpoint that was. The experiment thus gets spammed a little with checkpoints, it would be nice to be able to delete some later.

Describe the solution you'd like

Be able to delete images, artifacts, texts, model weights, ... through the UI and Python API.

Describe alternatives you've considered

There really is no alternative. Maybe except for creating a new experiment, log what you want to keep, and delete the old experiment.

Additional context

Great work otherwise! I'm really enjoying the website and its functionality!

DN6 commented 2 years ago

Hi @florianblume. You should be able to delete logged assets (images, checkpoints, etc) via the Comet API Object..

Here is a snippet to delete an asset from an experiment based on its name.

import comet_ml

api = comet_ml.API()
experiment = api.get("<your workspace>/<your project name>/<your experiment id>")

assets = experiment.get_asset_list()

asset_to_delete_name = "<you asset filename>"
for asset in assets:
    if asset["fileName"] == asset_to_delete_name:
        experiment.delete_asset(asset["assetId"])

Just a note, please be careful when deleting assets as this is a permanent action and cannot be undone.

florianblume commented 2 years ago

Ah thanks a lot! It didn't occur to me to look there because deleting projects and experiments is done on the main API but it makes sense that this is functionality of the Experiment API. Thanks again!

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.