Azure / Azure/MachineLearningNotebooks

`azureml-fsspec` file upload uninformative error

Aberta
#1,902 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Jupyter Notebook
Estrelas
4.4k
Forks
2.6k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-access-data-interactive?view=azureml-api-2&tabs=adls#access-data-from-a-datastore-uri-like-a-filesystem), 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](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-access-data-interactive?view=azureml-api-2&tabs=adls#upload-files-via-azuremachinelearningfilesystem)):
```python
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?

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Reproduce the documented AzureMachineLearningFileSystem.upload example with the shown local and remote paths. Start at azureml/fsspec/spec.py:146 and trace the upload and _info entry points to determine why the remote path is absent from _stream_infos. Done means the failure is either explained with actionable diagnostics or produces an informative error instead of the raw KeyError.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
azure, python
Domínio
cloud, machine-learning
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.