MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

Deleting experiments

Open davidbending opened this issue 6 years ago • 33 comments

Is it possible to delete individual experiments within a workspace. This would help keep things tidier and free up unneeded resources.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

davidbending avatar Feb 04 '19 12:02 davidbending

It is currently not possible to delete an experiment within a workspace but we are working on adding the functionality in the next several months.

heatherbshapiro avatar Feb 04 '19 15:02 heatherbshapiro

Is there an ETA for this?

mitchellspryn avatar Jun 26 '19 07:06 mitchellspryn

Any update on this issue?

amsword avatar Jun 29 '19 03:06 amsword

@deepak-muniappan

skasturi avatar Jun 30 '19 14:06 skasturi

Seriously there should have been an update on this already. My workspace is cluttered with months' worth of experiments and there should be a simple way to clean it up.

alexkayal avatar Jul 04 '19 11:07 alexkayal

Hoping for this to come sooner rather than later to clear clutter. There has to be a better way other than starting a new workspace.

richardleeaus avatar Jul 29 '19 23:07 richardleeaus

Are there any updates on this issue? This is definitely a must have for us. We are cluttered by months of experiment runs

alieus avatar Sep 16 '19 22:09 alieus

+1 hoping to have an update on this soon

nathanclemente avatar Sep 26 '19 13:09 nathanclemente

+1 hoping

qawnaoya avatar Oct 15 '19 11:10 qawnaoya

+1 hoping

Ridooo avatar Oct 15 '19 14:10 Ridooo

Well seems like they've added something in the latest version -> azureml-core-1.0.69 Now Experiment class has an archive function. You can use it like this:

    from azureml.core.experiment import Experiment
    ws = Workspace.from_config(auth=authenticate())
    ex = Experiment(ws, 'experiment_name')
    ex.archive()

This disables the experiment and then it is not visible in the UI anymore.

SeanMirchi avatar Oct 16 '19 09:10 SeanMirchi

+1 delete() method in the SDK

oussamachelly avatar Nov 12 '19 09:11 oussamachelly

+1 run.delete()method in the SDK as well.

b93rn avatar Sep 23 '20 16:09 b93rn

I see this is planned for version 2.0. What is the release date estimate?

jarandaf avatar Nov 03 '20 11:11 jarandaf

a limited private preview is starting this month, public preview date is not confirmed - @jpe316 @danielsc

lostmygithubaccount avatar Nov 03 '20 15:11 lostmygithubaccount

looks like the official documentation is ahead of the release. It already shows a delete method on the Experiment object

mrevow avatar Dec 22 '20 21:12 mrevow

Latest package version (1.19.0) has indeed a delete method but it does not seem to allow deleting experiments with runs:

ipdb> Experiment.delete(ws, exp.id)
*** msrestazure.azure_exceptions.CloudError: Azure Error: UserError
Message: Only empty Experiments can be deleted. This experiment contains run(s)

jarandaf avatar Dec 23 '20 05:12 jarandaf

preview is usable with limited support and features (but basic and distributed training works) - you can find the docs at https://aka.ms/azuremlv2 and the source repo at https://github.com/Azure/azureml-v2-preview

lostmygithubaccount avatar Dec 24 '20 01:12 lostmygithubaccount

While deleting experiments is currently not supported from the AML studio UI, the functionality to delete runs from the AML Studio UI is currently under private preview and should be available for public preview ETA end of of January.

swinner95 avatar Jan 14 '21 02:01 swinner95

I have been able to see the AML studio UI delete functionality on my workspace. However my customer does not see it yet. Do we need to whitelist their workspace for them to see the Delete button? Can you confirm is public preview?

ncolossi avatar Feb 09 '21 16:02 ncolossi

often, Microsoft employees will see these types of UI previews shortly before being rolled out publicly - @swinner95 to confirm ETAs/if you can onboard a customer sooner

lostmygithubaccount avatar Feb 09 '21 16:02 lostmygithubaccount

the run delete is still under private preview where users can delete the run metadata and metrics. For this functionality to be enabled for your subscription, users will need to request access and we will enable it for your subscription(s). (Signup: https://forms.office.com/r/57kj1BPx1t ) We are working on improving this functionality before rolling this functionality out more broadly.

swinner95 avatar Feb 10 '21 00:02 swinner95

Hello - I seem to be running into a similar issue as @jarandaf. Following the available syntax here - https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.experiment.experiment?view=azure-ml-py#delete-workspace--experiment-id-

# sample_code.py

# delete(workspace, experiment_id)
delete(ssuaml, mlflow-diabetes-experiment-logreg)

I ran the code in a Azure ML notebook with the following error:

azureuser@ssu1:~/cloudfiles/code/Users/sansu$ python sample_code.py 
Traceback (most recent call last):
  File "sample_code.py", line 3, in <module>
    delete(ssuaml, mlflow-diabetes-experiment-logreg)
NameError: name 'delete' is not defined

slsu0424 avatar Feb 22 '21 18:02 slsu0424

Can you try calling Experiment.delete(ssuaml, mlflow-diabetes-experiment-logreg) ?

swinner95 avatar Feb 23 '21 21:02 swinner95

@swinner95 - here is the error I receive:

Welcome to Azure Machine Learning Terminal

Type "git clone [url]" to clone a repo
Type "git --help" to learn about Git CLI
Type "az ml --help" to learn about Azure ML CLI

azureuser@ssu1:/mnt/batch/tasks/shared/LS_root/mounts/clusters/ssu1/code$ cd ~/cloudfiles/code/Users/sansu

python sample_code.py azureuser@ssu1:~/cloudfiles/code/Users/sansu$ azureuser@ssu1:~/cloudfiles/code/Users/sansu$ python sample_code.py Traceback (most recent call last): File "sample_code.py", line 4, in Experiment.delete(ssuaml, mlflow-diabetes-experiment-logreg) NameError: name 'Experiment' is not defined azureuser@ssu1:~/cloudfiles/code/Users/sansu$

slsu0424 avatar Mar 03 '21 15:03 slsu0424

Has thi issue been solved yet? I have encountered something like this: Here is what I have been trying to do:

# get a list of all Experiments objects contained in Workspace
experiments_lst = Experiment.list(ws)
for experiment in experiments_lst:
    print(experiment.name)
    Experiment.delete(ws, experiment.id)

And the response looks like this:

    raise CloudError(self._response)
msrestazure.azure_exceptions.CloudError: Azure Error: UserError
Message: Only empty Experiments can be deleted. This experiment contains run(s)

edwardnguyen1705 avatar May 01 '21 03:05 edwardnguyen1705

Any update on this issue?

AnaValeriaS avatar Jun 09 '21 10:06 AnaValeriaS

Hello, Experiment.delete() can only delete empty experiments, i.e. experiments without any runs. So if your experiment is not empty, you'll need to delete all the runs in it first before deleting the experiment.

luigiw avatar Jun 10 '21 21:06 luigiw

Running into the same 'experiment can't be deleted because it's got runs in it' message. It's not apparent how to delete runs - no link that I can see in the UI, the run object doesn't have a delete option - can someone tell me how runs can be deleted?

coleman-wma avatar Jul 12 '21 10:07 coleman-wma

AFAIK runs can be deleted from the UI in private preview. I am not sure whether this feature has been already officially released.

jarandaf avatar Jul 12 '21 10:07 jarandaf