Azure / Azure/azure-cli

Can't overwrite the list values in sweep job using az ml job create --set

Open
#24,539 2 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad Auto-Assign customer-reported Machine Learning Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **Related command**

```
az ml job create --set
```

### **Describe the bug**

I was trying to use "az ml job create --set" to overwrite the kernel search space from ["rbf", "linear", "poly"] to ["rbf", "linear"] for sweep step in this [example](https://github.com/Azure/azureml-examples/tree/main/cli/jobs/pipelines-with-components/pipeline_with_hyperparameter_sweep). I couldn't get it to work and this is the error I got:

```
Met error :{'jobs': defaultdict(, {'sweep_step': {'value': {'search_space': defaultdict(, {'kernel': {'value': [{'_schema': ['Not a valid string.']}, {'values': ['Not a valid list.']}, {'type': ["Value choice passed is not in set ['uniform', 'loguniform']"], 'min_value': ['Missing data for required field.'], 'max_value': ['Missing data for required field.'], 'values': ['Unknown field.']}, {'type': ["Value choice passed is not in set ['quniform', 'qloguniform']"], 'min_value': ['Missing data for required field.'], 'max_value': ['Missing data for required field.'], 'q': ['Missing data for required field.'], 'values': ['Unknown field.']}, {'type': ["Value choice passed is not in set ['normal', 'lognormal']"], 'mu': ['Missing data for required field.'], 'sigma': ['Missing data for required field.'], 'values': ['Unknown field.']}, {'type': ["Value choice passed is not in set ['qnormal', 'qlognormal']"], 'mu': ['Missing data for required field.'], 'sigma': ['Missing data for required field.'], 'q': ['Missing data for required field.'], 'values': ['Unknown field.']}, {'type': ["Value choice passed is not in set ['randint']"], 'upper': ['Missing data for required field.'], 'values': ['Unknown field.']}]}})}}})}
Please check log by running the command with '--debug' for more details.
```

### **To Reproduce**

The command I used:
```
az ml job create -f pipeline.yml --set jobs.sweep_step.search_space.kernel.values=["rbf","linear"]
```
I tried to overwrite another value using the below command and it worked. I wonder if the error was related to the type of the variable being a list?
```
az ml job create -f pipeline.yml --set jobs.sweep_step.search_space.coef0.min_value=0.5
```
### **Expected behavior**

The command executes successfully

### **Environment summary**

az version:
"azure-cli": "2.38.0",
"azure-cli-core": "2.38.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"ml": "2.6.1"
}

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.