Azure / Azure/azure-cli-extensions

`az ml job create` doesn't support non-string environment variables for component job

Open
#8,475 3 comments 0 reactions 0 assignees View on GitHub
Auto-Assign bug customer-reported extension/ml Machine Learning Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Describe the bug

I am trying to run a command job and setting an environment variable as boolean as mentioned in [this](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-read-write-data-v2?view=azureml-api-2&tabs=cli#available-mount-settings) section

![Image](https://github.com/user-attachments/assets/6bcbdfbe-dac4-4aff-bf5f-435e0348060e)

But running this job using `az ml job create` gives validation error that an environment variable needs to be a string.

![Image](https://github.com/user-attachments/assets/5890c839-921d-4735-a607-e760d2471482)

![Image](https://github.com/user-attachments/assets/0ebc93c1-b04e-43dd-85ef-75875d9d19f8)

Even tried with `--skip-validation` parameter, but it conveniently ignores that parameter and still throws that error. Any help?

### Related command

az ml job create --subscription --resource-group --workspace-name --file ".yaml" --stream

### Errors

![Image](https://github.com/user-attachments/assets/0ebc93c1-b04e-43dd-85ef-75875d9d19f8)

### Issue script & Debug output

...

### Expected behavior

Ability to accept boolean values as environment variables in a command Job as explained in the link: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-read-write-data-v2?view=azureml-api-2&tabs=cli#available-mount-settings

### Environment Summary

azure-cli 2.69.0

core 2.69.0
telemetry 1.1.0

Extensions:
ml 2.35.0

Dependencies:
msal 1.31.2b1
azure-mgmt-resource 23.1.1

Python location '/anaconda/envs/azureml_py38/bin/python'
Config directory '/home/azureuser/.azure'
Extensions directory '/opt/az/extensions'

Python (Linux) 3.10.11 | packaged by conda-forge | (main, May 10 2023, 18:58:44) [GCC 11.3.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

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