Registering Data Asset from Job with v2 SDK/CLI
Tomas Van Pottelbergh
21
Reputation points
Following this example I tried to register the output of a job as a Data Asset, by using the azureml:<my_data>:<version>
syntax for the path. The following minimal example shows what I'm trying to achieve:
from azure.ai.ml import command
from azure.ai.ml.entities import Data
from azure.ai.ml import Input, Output
from azure.ai.ml.constants import AssetTypes
my_job_outputs = {
"prep_data": Output(type=AssetTypes.URI_FOLDER, path="azureml:test_output:1")
}
job = command(
command="echo 'test' > ${{outputs.prep_data}}",
outputs=my_job_outputs,
environment="test-env@latest",
compute="cpu-cluster",
)
# submit the command
returned_job = ml_client.create_or_update(job)
Unfortunately, this fails. The job submission works, but the Job is immediately going to the Failed status with the following error message:
Invalid output uri azureml:test_output:1/ found for output prep_data of run , the list of supported uri formats are ["wasb://", "wasbs://", "adl://", "abfs", "abfss://", "azureml://"]
What is the correct syntax for registering a Data Asset from a Job output?
Sign in to answer