Skip to content

AzureML OutputFileDatasetConfig not useable with destination set #16375

@DominiqueLade

Description

@DominiqueLade
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.ML-Data4MLAreaPathMachine LearningService AttentionWorkflow: This issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions