Azure / MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
https://docs.microsoft.com/azure/machine-learning/service/
MIT License
4k stars 2.49k forks source link

Datastore.upload method is working, but impossible to delete files after #1932

Closed StintouchDev closed 11 months ago

StintouchDev commented 11 months ago

Hi, I have wrongly used the upload method of datastore class (from a Bing conversation/chatgpt response) and so have uploaded files I do not want on my Azure ML datastore. I do not know how to remove them and when I came to the documentation here to find a delete method, I do not even find the upload method...

[...]

# Connect to the workspace
ws = Workspace(subscription_id, resource_group, workspace_name)

# Get the default datastore for the workspace
datastore = Datastore.get_default(ws)

# Upload a directory to the datastore
datastore.upload('directory_path')

The files are at the root of my workspaceblobstore in datastore tab of Data section of my Azure ML workspace, and cannot find any solution to delete them.

Please can you help me ?


Détails du document

Ne pas modifier cette section. Elle est requise pour learn.microsoft.com ➟ Liaison des problèmes GitHub.

StintouchDev commented 11 months ago

Finally, I have succeeded to delete unwanted files by using the Azure Storage explorer (on Azure Platform, not Azure ML Platform). I have followed this article: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-export-delete-data

But still do not know why the upload method is working on Datastore object.

StintouchDev commented 11 months ago

In my terminal, there is this log : "Datastore.upload" is deprecated after version 1.0.69. Please use "Dataset.File.upload_directory" to upload your files from a local directory and create FileDataset in single method call. See Dataset API change notice at https://aka.ms/dataset-deprecation.

This explains all. Bing conversation (chatgpt online) gave me an old method and I stupidly trusted him.