Can Azure ML components write to dynamic outputs?
Anonymous
In the Azure ML SDK v2, is it possible to have a component that writes to different locations in Blob storage based on it's input?
Here is the only way I could think to arrange this (see path
in the outputs
variable), but it doesn't work. I don't think the ${{inputs.output_datastore}}
and ${{inputs.output_path}}
are accessible in the outputs
definition.
save_result_component = command(
name="save_result_component",
display_name="Save Result Component",
description="Saves data at input_path to output_path in output_datastore",
inputs={
"input_path": Input(type="uri_file"),
"output_datastore": Input(type="string"),
"output_path": Input(type='string')
},
outputs=dict(
output_path=Output(type="uri_file",
mode="rw_mount",
path="azureml://datastores/${{inputs.output_datastore}}/paths/${{inputs.output_path}}")
),
# The source folder of the component
code='./save_result',
command="""python save_result.py \
--input_path ${{inputs.input_path}} --output_path ${{outputs.output_path}} \
""",
environment="azureml:ffm_env:4",
)
Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
3,340 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,201 questions
Sign in to answer