0

Created an azure ml dataset. how do I delete the dataset if it already exists?

#register dataset
path='path'
file_ds=Dataset.File.from_files(path=path)
file_ds=file_ds.register(workspace=ws,name="Dataset")
Hamid
  • 103
  • 9
  • [Is there a way to delete datasets on AzureML?](https://learn.microsoft.com/en-us/answers/questions/567611/is-there-a-way-to-delete-datasets-on-azureml.html), [How to Delete Data Backing a Dataset](https://learn.microsoft.com/en-us/answers/questions/379022/how-to-delete-data-backing-a-dataset.html) and [Export or delete your Machine Learning service workspace data](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-export-delete-data) – Ecstasy Jul 27 '22 at 08:21
  • @DeepDave-MT Like the first link you mentioned but using azureml python sdk not azureml interface https://learn.microsoft.com/en-us/answers/questions/567611/is-there-a-way-to-delete-datasets-on-azureml.html – Hamid Jul 27 '22 at 08:28

1 Answers1

1

AFAIK, as of now, deleting the dataset using AzureML Python SDK is not possible via delete.datasets(). But it might be possible via delete_operations.py

As suggested by YutongTie, you can delete the dataset using the Azure Machine Learning Studio.

References: How to Delete Data Backing a Dataset, Export or delete your Machine Learning service workspace data and R interface to AzureML - delete dataset

Ecstasy
  • 1,866
  • 1
  • 9
  • 17
  • Is there a way to update azure ml dataset using AzureML Python SDK? or is that not possible? – Hamid Jul 27 '22 at 09:01
  • 1
    [dataset_v2_operations.py](https://github.com/Azure/azure-sdk-for-python/blob/396853110f5c15463e5a531ee759446d3389d441/sdk/ml/azure-ai-ml/azure/ai/ml/_restclient/dataset_dataplane/aio/operations/_dataset_v2_operations.py#:~:text=async%20def%20update_dataset) – Ecstasy Jul 27 '22 at 09:30
  • @Ecstasy - Can you give a sample of how to use the functions listed in dataset_v2_operations.py? I have installed azure-ai-ml and imported _dataset_v2_operations from that package (using from azure.ai.ml._restclient.dataset_dataplane.aio.operations import _dataset_v2_operations) , but cannot seem to run those functions correctly. I am particularly interested in delete_dataset_by_name(). – Irina Oct 10 '22 at 04:46