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

`azureml-fsspec` file upload uninformative error #1902

Open Ilia-Kosenkov opened 1 year ago

Ilia-Kosenkov commented 1 year ago

Hey, I am working on some simple EDA in AzureML, and I have successfully set up data asset to facilitate access to blob storage. Following this documentation, I can easily read data using a number of methods, including creating an AzureMachineLearningFileSystem and using it to .open() some remote file. However, when I try uploading a file back to blob storage using an instance of AzureMachineLearningFileSystem and its .upload() method, it just fails with an error message mentioning the remote path I pass to it.

So, given a file system fs, local file local.file.txt, which I want to upload as remote.file.txt, I run the following (based on the sample here):

fs.upload(lpath='local.file.txt', rpath='remote.file.txt', recursive=False, **{'overwrite': 'MERGE_WITH_OVERWRITE'})

But it results in an error with a lengthy stack trace, ending with:

File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/azureml/fsspec/spec.py:146, in AzureMachineLearningFileSystem._info(self, path)
    144 if len(self._stream_infos) == 1:
    145     return list(self._stream_infos.values())[0]['info']
--> 146 return self._stream_infos[path]['info']

KeyError: 'remote.file.txt'

which is not really helpful. Any advice on how to debug this issue?

shrutiald15 commented 2 months ago

Hi, I am facing the same issue. Did you find any solution for this?