Open titans2016 opened 1 year ago
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureml-github.
Author: | titans2016 |
---|---|
Assignees: | - |
Labels: | `bug`, `Service Attention`, `Machine Learning`, `customer-reported`, `Auto-Assign` |
Milestone: | - |
Adding Service team to look into this.
I had the same issue with the mentioned parameter, so I use --file
option and a file with the following content:
$schema: https://azuremlschemas.azureedge.net/latest/computeInstance.schema.json
idle_time_before_shutdown_minutes: 60
I also have another issue, the error message I get is as follows:
"tier": [
"Unknown field."
]
I use the --type "ComputeInstance"
option too.
Describe the bug
I am trying to automate creation compute instance in az ml. Based this documentation: https://learn.microsoft.com/en-us/cli/azure/ml/compute?view=azure-cli-latest#az-ml-compute-create-examples There is one parameter: --idle-time-before-scale-down -d Node idle time in seconds before scaling down the cluster. Default: 120.
But when I put it to my commands execution failed.
Related command
az ml compute create --resource-group --workspace-name [--admin-password] [--admin-username] [--description] [--enable-node-public-ip] [--file] [--identity-type] [--idle-time-before-scale-down] [--location] [--max-instances] [--min-instances] [--name] [--no-wait] [--set] [--size] [--ssh-key-value] [--ssh-public-access-enabled] [--subnet] [--tags] [--tier] [--type] [--user-assigned-identities] [--user-object-id] [--user-tenant-id] [--vnet-name]
Errors
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 663, in execute raise ex File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job result = cmd_copy(params) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 333, in call return self.handler(*args, kwargs) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler return op(command_args) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/compute.py", line 162, in ml_compute_create log_and_raise_error(e, debug) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/raise_error.py", line 181, in log_and_raise_error raise cli_error File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/compute.py", line 152, in ml_compute_create compute = load_compute(source=file, params_override=params_override) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_load_functions.py", line 329, in load_compute return load_common(Compute, source, relative_origin, kwargs) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_load_functions.py", line 112, in load_common raise e File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_load_functions.py", line 96, in load_common return _load_common_raising_marshmallow_error(cls, yaml_dict, relative_origin, params_override, kwargs) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_load_functions.py", line 146, in _load_common_raising_marshmallow_error return cls._load(data=yaml_dict, yaml_path=relative_origin, params_override=params_override, kwargs) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_compute/compute.py", line 184, in _load return ComputeInstance._load_from_dict(data, context, kwargs) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_compute/compute_instance.py", line 418, in _load_from_dict loaded_data = load_from_dict(ComputeInstanceSchema, data, context, **kwargs) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_util.py", line 147, in load_from_dict raise ValidationError(decorate_validation_error(schema, pretty_error, additional_message)) marshmallow.exceptions.ValidationError: Validation for ComputeInstanceSchema failed:
{ "idle_time_before_scale_down": [ "Unknown field." ] }
Visit this link to refer to the ComputeInstance schema if needed: https://aka.ms/ml-cli-v2-compute-instance-yaml-reference. The easiest way to author a specification file is using IntelliSense and auto-completion Azure ML VS code extension provides: https://code.visualstudio.com/docs/datascience/azure-machine-learning. To set up: https://docs.microsoft.com/azure/machine-learning/how-to-setup-vs-code
Issue script & Debug output
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib64/az/lib/python3.9/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 663, in execute raise ex File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job result = cmd_copy(params) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/init.py", line 333, in call return self.handler(*args, kwargs) File "/usr/lib64/az/lib/python3.9/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler return op(command_args) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/compute.py", line 162, in ml_compute_create log_and_raise_error(e, debug) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/raise_error.py", line 181, in log_and_raise_error raise cli_error File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/custom/compute.py", line 152, in ml_compute_create compute = load_compute(source=file, params_override=params_override) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_load_functions.py", line 329, in load_compute return load_common(Compute, source, relative_origin, kwargs) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_load_functions.py", line 112, in load_common raise e File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_load_functions.py", line 96, in load_common return _load_common_raising_marshmallow_error(cls, yaml_dict, relative_origin, params_override, kwargs) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_load_functions.py", line 146, in _load_common_raising_marshmallow_error return cls._load(data=yaml_dict, yaml_path=relative_origin, params_override=params_override, kwargs) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_compute/compute.py", line 184, in _load return ComputeInstance._load_from_dict(data, context, kwargs) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_compute/compute_instance.py", line 418, in _load_from_dict loaded_data = load_from_dict(ComputeInstanceSchema, data, context, **kwargs) File "/usr/lib/python3.9/site-packages/azure-cli-extensions/ml/azext_mlv2/manual/vendored_curated_sdk/azure/ai/ml/entities/_util.py", line 147, in load_from_dict raise ValidationError(decorate_validation_error(schema, pretty_error, additional_message)) marshmallow.exceptions.ValidationError: Validation for ComputeInstanceSchema failed:
{ "idle_time_before_scale_down": [ "Unknown field." ] }
Visit this link to refer to the ComputeInstance schema if needed: https://aka.ms/ml-cli-v2-compute-instance-yaml-reference. The easiest way to author a specification file is using IntelliSense and auto-completion Azure ML VS code extension provides: https://code.visualstudio.com/docs/datascience/azure-machine-learning. To set up: https://docs.microsoft.com/azure/machine-learning/how-to-setup-vs-code
Expected behavior
Compute instance creating with idle time to shut down compute instance.
Environment Summary
azure-cli 2.50.0 core 2.50.0 telemetry 1.0.8 Extensions: ai-examples 0.2.5 ml 2.18.0 ssh 1.1.6
Dependencies: msal 1.22.0 azure-mgmt-resource 23.1.0b2
Python location '/usr/bin/python3.9' Extensions directory '/home/.../.azure/cliextensions' Extensions system directory '/usr/lib/python3.9/site-packages/azure-cli-extensions'
Python (Linux) 3.9.14 (main, Feb 8 2023, 03:39:52) [GCC 11.2.0]
Additional context
No response