MachineLearningNotebooks
MachineLearningNotebooks copied to clipboard
Deleting experiments
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.
- ID: 47d45e80-f383-aeab-3c36-78db3481325a
- Version Independent ID: 49573b7e-1193-c0d0-b2a1-c38eaaed943c
- Content: azureml.core.Experiment class - Azure Machine Learning Python
- Content Source: AzureML/docs-ref-autogen/azureml-core/azureml.core.Experiment(class).yml
- Service: machine-learning
- GitHub Login: @j-martens
- Microsoft Alias: jmartens
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.
Is there an ETA for this?
Any update on this issue?
@deepak-muniappan
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.
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.
Are there any updates on this issue? This is definitely a must have for us. We are cluttered by months of experiment runs
+1 hoping to have an update on this soon
+1 hoping
+1 hoping
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.
+1 delete()
method in the SDK
+1 run.delete()
method in the SDK as well.
I see this is planned for version 2.0. What is the release date estimate?
a limited private preview is starting this month, public preview date is not confirmed - @jpe316 @danielsc
looks like the official documentation is ahead of the release. It already shows a delete method on the Experiment object
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)
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
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.
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?
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
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.
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
Can you try calling Experiment.delete(ssuaml, mlflow-diabetes-experiment-logreg) ?
@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
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)
Any update on this issue?
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.
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?
AFAIK runs can be deleted from the UI in private preview. I am not sure whether this feature has been already officially released.