Description
Describe the bug
az ml online-deployment create --file deployment-config.yaml --debug
my - deployment-config.yaml
############
$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineDeployment.schema.json
type: deployment
name: shonty-deployment
endpoint_name: shonty-endpoint-for-innovation
model:
path: azureml:shonty-prod-innovation:1 ## this exists in my azure portal
environment:
name: azureml-promptflow-environment
version: 1
instance_type: Standard_DS3_v2
instance_count: 1
##########
Error
File "C:\Users\kesava01.azure\cliextensions\ml\azext_mlv2\manual\vendored_curated_sdk\azure\ai\ml_utils_asset_utils.py", line 259, in _get_file_hash
with open(str(filename), "rb") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: 'C:\PromptFlow\github\promptflow\azureml:shonty-prod-innovation:1'
During handling of the above exception, another exception occurred:
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 666, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 734, 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 703, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 336, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 120, in handler
File "C:\Users\kesava01.azure\cliextensions\ml\azext_mlv2\manual\custom\online_deployment.py", line 132, in ml_online_deployment_create
log_and_raise_error(err, debug, yaml_operation=yaml_operation)
^^^^^
UnboundLocalError: cannot access local variable 'debug' where it is not associated with a value
Related command
$ az ml online-deployment create --file deployment-config.yaml --debug
Errors
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 666, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 734, 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 703, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 336, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 120, in handler
File "C:\Users\kesava01.azure\cliextensions\ml\azext_mlv2\manual\custom\online_deployment.py", line 132, in ml_online_deployment_create
log_and_raise_error(err, debug, yaml_operation=yaml_operation)
^^^^^
UnboundLocalError: cannot access local variable 'debug' where it is not associated with a value
Issue script & Debug output
create online deployment with 100% traffic
az ml online-deployment create --file deployment.yaml --all-traffic
Expected behavior
should resolve the model path correctly to azure portal
Environment Summary
(base) PS C:\Users\kesava> python --version
Python 3.12.8
Additional context
referred CLI- azureml-examples\cli\generative-ai\promptflow\deploy-flow
Activity