Azure / azure-cli

Azure Command-Line Interface
MIT License
3.92k stars 2.89k forks source link

Update Build machine in AzureML Workspace #29148

Open FrsECM opened 1 month ago

FrsECM commented 1 month ago

Describe the bug

I want to update the build machine of an azureml workspace with this documentation : https://learn.microsoft.com/en-us/azure/machine-learning/how-to-secure-workspace-vnet?view=azureml-api-2&tabs=required%2Cpe%2Ccli#enable-azure-container-registry-acr

But the command give me this :

image

Related command

az ml workspace update --name $WORKSPACE--subscription $SUBSCRIPTION--resource-group $RESOURCE_GROUP--image-build-compute $CLUSTER_NAME

Errors

The command failed with an unexpected error. Here is the traceback: name 'select_load_function' is not defined Traceback (most recent call last): File "/home/default/miniconda/envs/domf_iris2/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) File "/home/default/miniconda/envs/domf_iris2/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 664, in execute raise ex File "/home/default/miniconda/envs/domf_iris2/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/home/default/miniconda/envs/domf_iris2/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job result = cmd_copy(params) File "/home/default/miniconda/envs/domf_iris2/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 334, in call return self.handler(*args, kwargs) File "/home/default/miniconda/envs/domf_iris2/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 240, in handler result = cached_put(self.cmd, setter, setterargs) File "/home/default/miniconda/envs/domf_iris2/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 453, in cached_put return _put_operation() File "/home/default/miniconda/envs/domf_iris2/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 447, in _put_operation result = operation(**kwargs) File "/home/f296849/.azure/cliextensions/ml/azext_mlv2/manual/custom/workspace.py", line 212, in ml_workspace_update workspace = select_load_function()(file, params_override=params_override) NameError: name 'select_load_function' is not defined To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

Issue script & Debug output

Same as before, it's a bug in the code of the cli.

Expected behavior

I expect that the command works.

Environment Summary

{ "azure-cli": "2.61.0", "azure-cli-core": "2.61.0", "azure-cli-telemetry": "1.1.0", "extensions": { "ml": "2.26.1" } }

Additional context

It's a blocker if we want to build an image for a private azureml workspace.

yonzhan commented 1 month ago

Thank you for opening this issue, we will look into it.

SheoLee commented 1 month ago

With same az version, I also had the same error while running cmd: az ml workspace update --name ws --resource-group rg --managed-network allow_internet_outbound

diondrapeck commented 1 month ago

This may be related to this issue: https://github.com/Azure/azure-cli/issues/28980

SheoLee commented 1 month ago

This may be related to this issue: #28980

Yes, I leveraged one tip to downgrade ml extension version from 2.26.1 to 2.25.0. And the error is gone.

diondrapeck commented 1 month ago

Glad you were able to mitigate by downgrading for now. This will be fixed in 2.27.0 release for ml cli.