Azure Machine Learning pipelines fail due to missing space in optional component arguments when rendering runtime expression
Describe the bug
We try to follow the recommendation of using optional inputs as described here: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-manage-inputs-outputs-pipeline?view=azureml-api-2&tabs=cli#define-optional-inputs But our pipeline throw error unrecognized arguments.
Related command
az ml component create -f XXX.yaml az ml job create -f XXX.yaml
Errors
In our command component, we added
And we got following error from our pipeline job
Error: train.py: error: unrecognized arguments: --max_epocs5
Issue script & Debug output
There is no error when using the cli tool directly. The error happens when our pipeline in Azure Machine Learning runs.
Expected behavior
No error should exist and optional parameter should be provided correctly.
Environment Summary
azure-cli 2.68.0 *
core 2.68.0 * telemetry 1.1.0
Extensions: ml 2.35.0
Dependencies: msal 1.31.1 azure-mgmt-resource 23.1.1
Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe' Extensions directory 'C:\Users\z005230u.azure\cliextensions'
Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]
Additional context
No response
Hi @donin1129,
2.68.0 is not the latest Azure CLI(2.69.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.
Hi @yonzhan ,
Is there any update on this issue? I'm from the Copilot Discover team and I'm experiencing the same with optional arguments. I have the following in the component yaml:
On the other hand, this is what I see in the job command (i.e. no space between the argument and its value):