AzureML OutputFileDatasetConfig not useable with destination set
- Package Name: azureml-core
- Package Version: 1.21.0.post1
- Operating System: MacOS
- Python Version: 3.7.4
Describe the bug
I am not able to use OutputFileDatasetConfig with a destination pointing to a Blobstorage or DataLake Gen 2.
The following error is raised:
File "/.venv/lib/python3.7/site-packages/azureml/data/output_dataset_config.py", line 459, in to_data_location
datastore_name = destination[0].name
TypeError: 'AzureBlobDatastore' object is not subscriptable
To Reproduce Steps to reproduce the behavior:
# Connect to Azure ML
interactive_auth = InteractiveLoginAuthentication(tenant_id=tenant_id)
ws = Workspace(subscription_id, resource_group, workspace_name, auth=interactive_auth)
experiment = Experiment(workspace=ws, name="test-experiment")
# Get Dataset
my-output-dataset = OutputFileDatasetConfig(name="attachments", destination=ws.datastores["my-datastore"])
# Set Run Config
pipeline_path = Path(__file__).parent.absolute()
config = ScriptRunConfig(
source_directory='./',
script="my-script.py",
compute_target="default-compute-target",
arguments=[
"--path",
my-output-dataset.as_mount(),
],
)
# Execute Script
run = experiment.submit(config)
Expected behavior Mount Blobstorage and Datalake Gen 2 as output dataset to a compute target
Screenshots
Additional context
Hi,
unfortunately, I still have the same issue as described above. This is currently a show stopper for us.
Is this the right place to fill the bug report? Is anyone investigating this?
We tried to do this as well, and it didn't work for us either. You can use File Share, which will return a result, but we found other bugs even when we found a workaround for this.
@yeamusic21 Thanks for sharing your insights. Do you mind to elaborate a bit about the other bugs?
@DominiqueLade - https://github.com/Azure/azure-sdk-for-python/issues/16568
Also, https://stackoverflow.com/questions/65240603/azure-ml-studio-ml-pipeline-exception-no-temp-file-found
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.
Issue Details
- Package Name: azureml-core
- Package Version: 1.21.0.post1
- Operating System: MacOS
- Python Version: 3.7.4
Describe the bug
I am not able to use OutputFileDatasetConfig with a destination pointing to a Blobstorage or DataLake Gen 2.
The following error is raised:
File "/.venv/lib/python3.7/site-packages/azureml/data/output_dataset_config.py", line 459, in to_data_location
datastore_name = destination[0].name
TypeError: 'AzureBlobDatastore' object is not subscriptable
To Reproduce Steps to reproduce the behavior:
# Connect to Azure ML
interactive_auth = InteractiveLoginAuthentication(tenant_id=tenant_id)
ws = Workspace(subscription_id, resource_group, workspace_name, auth=interactive_auth)
experiment = Experiment(workspace=ws, name="test-experiment")
# Get Dataset
my-output-dataset = OutputFileDatasetConfig(name="attachments", destination=ws.datastores["my-datastore"])
# Set Run Config
pipeline_path = Path(__file__).parent.absolute()
config = ScriptRunConfig(
source_directory='./',
script="my-script.py",
compute_target="default-compute-target",
arguments=[
"--path",
my-output-dataset.as_mount(),
],
)
# Execute Script
run = experiment.submit(config)
Expected behavior Mount Blobstorage and Datalake Gen 2 as output dataset to a compute target
Screenshots
Additional context
| Author: | DominiqueLade |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.
Issue Details
- Package Name: azureml-core
- Package Version: 1.21.0.post1
- Operating System: MacOS
- Python Version: 3.7.4
Describe the bug
I am not able to use OutputFileDatasetConfig with a destination pointing to a Blobstorage or DataLake Gen 2.
The following error is raised:
File "/.venv/lib/python3.7/site-packages/azureml/data/output_dataset_config.py", line 459, in to_data_location
datastore_name = destination[0].name
TypeError: 'AzureBlobDatastore' object is not subscriptable
To Reproduce Steps to reproduce the behavior:
# Connect to Azure ML
interactive_auth = InteractiveLoginAuthentication(tenant_id=tenant_id)
ws = Workspace(subscription_id, resource_group, workspace_name, auth=interactive_auth)
experiment = Experiment(workspace=ws, name="test-experiment")
# Get Dataset
my-output-dataset = OutputFileDatasetConfig(name="attachments", destination=ws.datastores["my-datastore"])
# Set Run Config
pipeline_path = Path(__file__).parent.absolute()
config = ScriptRunConfig(
source_directory='./',
script="my-script.py",
compute_target="default-compute-target",
arguments=[
"--path",
my-output-dataset.as_mount(),
],
)
# Execute Script
run = experiment.submit(config)
Expected behavior Mount Blobstorage and Datalake Gen 2 as output dataset to a compute target
Screenshots
Additional context
| Author: | DominiqueLade |
|---|---|
| Assignees: | - |
| Labels: |
|
| Milestone: | - |
Hi @DominiqueLade The destination parameter requires a tuple, so, you should specify it to something like this: my-output-dataset = OutputFileDatasetConfig(name="attachments", destination=(ws.datastores["my-datastore"], "/output/{run-id}/{output-name}"))
Thanks for the clarification!
Might be a good idea to improve the error messages.
Thanks @DominiqueLade - please reopen this issue if you have any further questions #please-close
Hi , I have an issue similar to this one. When I want to connect to blobstorage (following code) in AML I get the following error :
from azureml.data import OutputFileDatasetConfig ws = Workspace.from_config() output = OutputFileDatasetConfig(destination=(blob_datastore, 'unzip'))
TypeError: expected str, bytes or os.PathLike object, not OutputFileDatasetConfig
I am following the reference "https://docs.microsoft.com/en-us/azure/machine-learning/how-to-train-with-datasets#mount-vs-download"
- azureml.core 1.32.0
- Operating System: windows
- Python Version: 3.8
Hi, experiencing problem with AzureBlobStorage as well, Only I don't get any errors - the script just doesn't run. Any advice?