-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
I'm trying to install and use the ml extension on an AlmaLinux machine. You can easily reproduce the issue using Docker.
The installation of Azure CLI went well (I followed https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=dnf).
The installation of the ml extension using az extension add—n ml also went well.
However, as soon as I enter any az ml ... command, I get this output:
$ az ml model list
No module named 'google.protobuf'
'ml' is misspelled or not recognized by the system.
Examples from AI knowledge base:
az extension add --name anextension
Add extension by name
az extension list-available
List all publicly available extensions
https://docs.microsoft.com/en-US/cli/azure/extension#az_extension_add
Read more about the command in reference docs
The important part is the No module named 'google.protobuf' message.
Related command
az ml model list
Errors
No module named 'google.protobuf'
'ml' is misspelled or not recognized by the system.
Examples from AI knowledge base:
az extension add --name anextension
Add extension by name
az extension list-available
List all publicly available extensions
https://docs.microsoft.com/en-US/cli/azure/extension#az_extension_add
Read more about the command in reference docs
Issue script & Debug output
$ az ml model list --debug
cli.knack.cli: Command arguments: ['ml', 'model', 'list', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f27619e3310>, <function OutputProducer.on_global_arguments at 0x7f2761086d30>, <function CLIQuery.on_global_arguments at 0x7f2760e24310>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: No module found from index for '['ml', 'model', 'list', '--debug']'
cli.azure.cli.core: Loading all modules and extensions
cli.azure.cli.core: Discovered command modules: ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'compute_recommender', 'computefleet', 'config', 'configure', 'consumption', 'container', 'containerapp', 'cosmosdb', 'databoxedge', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', 'mysql', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'resource', 'role', 'search', 'security', 'servicebus', 'serviceconnector', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'synapse', 'util', 'vm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: acr 0.115 36 149
cli.azure.cli.core: acs 0.014 14 77
cli.azure.cli.core: advisor 0.001 3 6
cli.azure.cli.core: ams 0.004 22 100
cli.azure.cli.core: apim 0.005 14 69
cli.azure.cli.core: appconfig 0.002 9 47
cli.azure.cli.core: appservice 0.018 79 270
cli.azure.cli.core: aro 0.006 1 10
cli.azure.cli.core: backup 0.016 16 60
cli.azure.cli.core: batch 0.039 34 102
cli.azure.cli.core: batchai 0.002 10 30
cli.azure.cli.core: billing 0.009 19 53
cli.azure.cli.core: botservice 0.003 12 42
cli.azure.cli.core: cdn 0.089 8 50
cli.azure.cli.core: cloud 0.001 1 7
cli.azure.cli.core: cognitiveservices 0.002 10 33
cli.azure.cli.core: compute_recommender 0.002 1 1
cli.azure.cli.core: computefleet 0.005 1 1
cli.azure.cli.core: config 0.001 2 7
cli.azure.cli.core: configure 0.001 2 5
cli.azure.cli.core: consumption 0.011 8 9
cli.azure.cli.core: container 0.005 2 17
cli.azure.cli.core: containerapp 0.063 37 123
cli.azure.cli.core: cosmosdb 0.012 58 199
cli.azure.cli.core: databoxedge 0.005 5 28
cli.azure.cli.core: dls 0.002 6 36
cli.azure.cli.core: dms 0.001 3 22
cli.azure.cli.core: eventgrid 0.004 25 96
cli.azure.cli.core: eventhubs 0.007 14 21
cli.azure.cli.core: extension 0.001 1 7
cli.azure.cli.core: feedback 0.000 1 2
cli.azure.cli.core: find 0.001 1 1
cli.azure.cli.core: hdinsight 0.004 9 42
cli.azure.cli.core: identity 0.002 2 11
cli.azure.cli.core: interactive 0.000 1 1
cli.azure.cli.core: iot 0.099 19 82
cli.azure.cli.core: keyvault 0.006 20 113
cli.azure.cli.core: lab 0.019 9 29
cli.azure.cli.core: managedservices 0.006 3 8
cli.azure.cli.core: maps 0.001 5 13
cli.azure.cli.core: marketplaceordering 0.001 1 2
cli.azure.cli.core: monitor 0.339 18 61
cli.azure.cli.core: mysql 0.049 16 56
cli.azure.cli.core: netappfiles 0.028 8 17
cli.azure.cli.core: network 0.087 103 338
cli.azure.cli.core: policyinsights 0.007 9 17
cli.azure.cli.core: privatedns 0.013 14 60
cli.azure.cli.core: profile 0.001 2 8
cli.azure.cli.core: rdbms 0.133 50 208
cli.azure.cli.core: redis 0.002 7 38
cli.azure.cli.core: relay 0.015 7 8
cli.azure.cli.core: resource 0.013 52 232
cli.azure.cli.core: role 0.003 17 61
cli.azure.cli.core: search 0.005 7 19
cli.azure.cli.core: security 0.008 48 98
cli.azure.cli.core: servicebus 0.005 13 17
cli.azure.cli.core: serviceconnector 0.044 20 315
cli.azure.cli.core: servicefabric 0.008 27 80
cli.azure.cli.core: signalr 0.002 10 42
cli.azure.cli.core: sql 0.013 56 215
cli.azure.cli.core: sqlvm 0.021 4 20
cli.azure.cli.core: storage 0.044 59 273
cli.azure.cli.core: synapse 0.010 54 246
cli.azure.cli.core: util 0.001 3 7
cli.azure.cli.core: vm 0.034 58 233
cli.azure.cli.core: Total (65) 1.471 1186 4650
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
No module named 'google.protobuf'
azext_mlv2.manual.vendored_curated_sdk.azure.ai.ml._azure_environments: Using the default cloud configuration: 'AzureCloud'.
cli.azure.cli.core: ml 0.866 1 0 /home/ec2-user/.azure/cliextensions/ml
cli.azure.cli.core: Total (1) 0.866 1 0
cli.azure.cli.core: Loaded 1173 groups, 4650 commands.
cli.azure.cli.core: Updated command index in 0.005 seconds.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f275d3250d0>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/ec2-user/.azure/commands/2024-11-28.10-19-30.unknown_command.23173.log'.
az_command_data_logger: command args: ml model list --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f275d353dc0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f275d2f5dc0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f275d313c10>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x7f275d313ca0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7f275a920d30>]
urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22ml%22%2C+%22parameters%22%3A+%22%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.67.0%22%2C+%22errorType%22%3A+%22UnknownSubcommand%22%2C+%22correlationId%22%3A+%2230aabb33-72bf-458b-83d1-683b9620de2d%22%2C+%22subscriptionId%22%3A+%228c59bf15-b4a9-4398-a354-d2a4e7d60e2a%22%2C+%22eventId%22%3A+%223219860f-9a29-4c5f-99e2-28e8cdd3ea32%22%7D HTTP/1.1" 200 None
cli.azure.cli.core.command_recommender: "--name" is an invalid parameter for command "ml".
cli.azure.cli.core.azclierror: NoneType: None
cli.azure.cli.core.azclierror: 'ml' is misspelled or not recognized by the system.
az_command_data_logger: 'ml' is misspelled or not recognized by the system.
Examples from AI knowledge base:
az extension add --name anextension
Add extension by name
az extension list-available
List all publicly available extensions
https://docs.microsoft.com/en-US/cli/azure/extension#az_extension_add
Read more about the command in reference docs
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f275d325310>]
az_command_data_logger: exit code: 2
cli.__main__: Command ran in 2.674 seconds (init: 0.116, invoke: 2.558)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3940 in cache file under /home/ec2-user/.azure/telemetry/20241128101930609
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/usr/bin/python3.9 /usr/lib64/az/lib/python3.9/site-packages/azure/cli/telemetry/__init__.py /home/ec2-user/.azure /home/ec2-user/.azure/telemetry/20241128101930609"
telemetry.process: Return from creating process 23177
telemetry.main: Finish creating telemetry upload process.
Expected behavior
I would have expected error messages relative to the command I've entered, like one the following arguments are required: [--workspace-name/-w, --registry-name] or Please run 'az login' to setup account., not an internal error coming from protobuf.
Environment Summary
azure-cli 2.67.0
core 2.67.0
telemetry 1.1.0
Extensions:
ml 2.32.4
Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1
Python location '/usr/bin/python3.9'
Extensions directory '/root/.azure/cliextensions'
Python (Linux) 3.9.19 (main, Sep 11 2024, 00:00:00)
[GCC 11.5.0 20240719 (Red Hat 11.5.0-2)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No bug in Ubuntu.