Azure / Azure/MachineLearningNotebooks

Creating a file dataset from a single directory in datastore requires azureml-dataset-runtime?

Abierto
#1,912 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Jupyter Notebook
Estrellas
4.4k
Forks
2.6k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I am trying to create a file dataset from a single directory in datastore. Im following the code block from

https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.data.dataset_factory.filedatasetfactory?view=azure-ml-py#azureml-data-dataset-factory-filedatasetfactory-from-files

Specifically,

```python
from azureml.core import Dataset, Datastore

# create file dataset from a single file in datastore
datastore = Datastore.get(workspace, 'workspaceblobstore')

# create file dataset from a single directory in datastore
file_dataset_2 = Dataset.File.from_files(path=(datastore, 'image/'))
```

However, when I try to replicate these steps for my own Datastore, I encounter an Import Error

`ImportError: Missing required package "azureml-dataset-runtime", which can be installed by running: "c:\Users\\.conda\envs\\python.exe" -m pip install azureml-dataset-runtime --upgrade`

I am on Python 3.11.3 and I tried installing azureml-dataset-runtime but I encounter a dependency clash which requires me to downgrade to Python 3.8.

Furthermore, from the PyPI page

https://pypi.org/project/azureml-dataset-runtime/

It states that azureml-dataset-runtime is "is internal, and is not intended to be used directly."

Is this intended? I am trying to mount my data for a custom ML training job, using the [as_mount](https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.data.filedataset?view=azure-ml-py#azureml-data-filedataset-as-mount) function from the FileDataset Class. Please let me know if there is a better alternative to mounting data, or am I forced to use Python 3.8?

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: 091afd7e-72ca-a384-01db-4da4d40a6734
* Version Independent ID: 0f3783bf-ab1f-f0d6-08f3-90becae914e8
* Content: [azureml.data.dataset_factory.FileDatasetFactory class - Azure Machine Learning Python](https://learn.microsoft.com/en-us/python/api/azureml-core/azureml.data.dataset_factory.filedatasetfactory?view=azure-ml-py#azureml-data-dataset-factory-filedatasetfactory-from-files)
* Content Source: [AzureML-Docset/stable/docs-ref-autogen/azureml-core/azureml.data.dataset_factory.FileDatasetFactory.yml](https://github.com/MicrosoftDocs/MachineLearning-Python-pr/blob/live/AzureML-Docset/stable/docs-ref-autogen/azureml-core/azureml.data.dataset_factory.FileDatasetFactory.yml)
* Service: **machine-learning**
* Sub-service: **core**
* GitHub Login: @DebFro
* Microsoft Alias: **debfro**

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Empieza con el ejemplo de documentación de FileDatasetFactory.from_files y el punto de entrada FileDataset.as_mount; después, comprueba cómo se comporta el ejemplo con Python 3.11 y la dependencia azureml-dataset-runtime. Se considera terminado cuando el flujo de trabajo documentado para un directorio individual tiene una ruta de runtime y dependencias compatibles, o cuando la documentación explica claramente la limitación y un enfoque alternativo de montaje.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
documentation, machine-learning
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.