How to pass additional arguments to "az ml batch-endpoint invoke"?

ShilpaGopal 100 Reputation points
2024-01-12T15:58:02.21+00:00

I am trying to invoke batch endpoint from CLI via azure devops pipeline. I am using the below cli command. I am following the azure batch cli documentation link

JOB_NAME=$(az ml batch-endpoint invoke -n  temperature-endpoint --input-type uri_folder --input azureml://datastores/temperature/paths/SourceData/Batch --output-path azureml://datastores/temperature/paths/Output --query name -o tsv --debug)

I want to pass the model name & model version as parameters. How can I set the model name and model version in the above invoke command? I tried adding the argument : "--set inputs.modelname=temperature_mdl" to the above invoke command. But I get error:

marshmallow.exceptions.ValidationError: {'inputs': ['Unknown field.']}

I tried passing : "--file inputs.yml" to the above invoke command. The contents of inputs.yml is as below:

inputs:
  batchinputdatafolder:
    type: uri_folder
    path: azureml://datastores/temperature/paths/SourceData/Batch
  modelname:
    type: string
    default: temperature_mdl
  modelversion:
    type: string
    default: 1
outputs: 
  batchoutputdatafolder:
    type: uri_folder
    path: azureml://datastores/temperature/paths/Output

But I get the error below error even through the inputs.yml file is in the same directly from where I am executing invoke command.

ERROR: cli.azure.cli.core.azclierror: No such file or directory: inputs.yml

Question: How do I pass additional arguments (other than data path) in az ml batch-endpoint invoke CLI?

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,566 questions
{count} votes