Azure / Azure/azure-cli

Azure Machine Learning pipelines fail due to missing space in optional component arguments when rendering runtime expression

Open
#30,926 4 comments 0 reactions 1 assignee Assigned to @lavakumarrepala View on GitHub
act-codegen-extensibility-squad Auto-Assign Auto-Resolve bug customer-reported Machine Learning Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### 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

![Image](https://github.com/user-attachments/assets/375d9497-a32c-4f72-a57b-3a7783653174)

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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.