Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az ml update error: "NameError: name 'select_load_function' is not defined" #29168

Open
alexmpm opened this issue Jun 14, 2024 · 5 comments
Open
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning az ml Possible-Solution Service Attention This issue is responsible by Azure service team. Similar-Issue

Comments

@alexmpm
Copy link

alexmpm commented Jun 14, 2024

Describe the bug

Tryng up update my AML WS following the AML documentation, getting an error "name 'select_load_function' is not defined".
image

Tried from my computer terminal and also from the Azure Cloud Shell - same behaviour. Just installed the ml extension on my computer, so using the last version "2.26.1"

Related command

az ml workspace update -n -g --file .yml

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 "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 664, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 701, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 240, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 453, in cached_put
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 447, in _put_operation
File "C:\Users\almeneze.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

Issue script & Debug output

cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: name 'select_load_function' is not defined
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 664, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 701, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 240, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 453, in cached_put
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 447, in _put_operation
File "C:\Users\almeneze.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
az_command_data_logger: name 'select_load_function' is not defined
Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 664, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 701, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 240, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 453, in cached_put
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 447, in _put_operation
File "C:\Users\almeneze.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

Expected behavior

My AML workspace would be updated and I would get a confirmation message

Environment Summary

Python 3.9.19
azure-cli 2.61.0
core 2.61.0
telemetry 1.1.0
Extensions:
ai-examples 0.2.5
ml 2.26.1
ssh 2.0.3
Dependencies:
msal 1.28.0
azure-mgmt-resource 23.1.1

Additional context

No response

@alexmpm alexmpm added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jun 14, 2024
Copy link

Hi @alexmpm
Find similar issue #29148.

Issue title Update Build machine in AzureML Workspace
Create time 2024-06-11
Comment number 0

Possible solution:
As mentioned in that issue, downgrading the ml extension version from 2.26.1 to 2.25.0 might resolve the error. You can try downgrading the extension version and see if it resolves the issue.


Please confirm if this resolves your issue.

@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Jun 14, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Service Attention This issue is responsible by Azure service team. Machine Learning az ml labels Jun 14, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Jun 14, 2024

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

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.

@alexmpm
Copy link
Author

alexmpm commented Jun 17, 2024

Hi @alexmpm Find similar issue #29148.

Issue title Update Build machine in AzureML Workspace
Create time 2024-06-11
Comment number 0
Possible solution: As mentioned in that issue, downgrading the ml extension version from 2.26.1 to 2.25.0 might resolve the error. You can try downgrading the extension version and see if it resolves the issue.

Please confirm if this resolves your issue.

It is not possible to downgrade packages while using Azure cloud shell. So the proposed solution does not work for me

@diondrapeck
Copy link
Member

@alexmpm - This will be fixed in the 2.27.0 release for ml cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning az ml Possible-Solution Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

3 participants