Hi Ho Ming Tam,
The YAML file specifies details about the compute target, such as the type of compute, virtual machine size, and other relevant settings.
To use a YAML file with the az ml compute create
command, you need to make sure that the YAML file is accessible from the location where you are running the command.
There are a few ways you can achieve this:
1.Local Path: If the YAML file is located on your local machine, you should navigate to the directory where the YAML file is stored using the command line or terminal. Then, you can run the az ml compute create
command with the --file
parameter, providing the path to the YAML file.
cd /path/to/yaml/file
az ml compute create --file compute. yml --resource-group my-resource-group --workspace-name my-workspace
2.Azure Machine Learning Workspace: If your Azure Machine Learning workspace has a folder structure, you can upload the YAML file to a location within your Azure Machine Learning workspace. You can use the Azure Machine Learning Studio or the Azure Portal to upload the file. Once the file is in your workspace, you can reference it in the az ml compute create
command.
az ml compute create --file /path/in/workspace/compute.yml --resource-group my-resource-group --workspace-name my-workspace.
Choose the approach that best fits your scenario based on where the YAML file is located and ensure that you provide the correct path or URL in the --file
parameter when running the az ml compute create
command.
Refer to the Azure Machine Learning documentation for details on configuring compute targets using YAML files: Configure and create compute targets using YAML.
https://learn.microsoft.com/en-us/azure/machine-learning/how-to-deploy-online-endpoints?view=azureml-api-2
If you have found the answer provided to be helpful, please click on the "Accept answer".