Where should I save the YAML file in Azure in order to use in az ml compute creation?

Ho Ming Tam 45 Reputation points
2023-12-17T12:59:44.6166667+00:00

Hi,

May I know where I should save the YAML file so I can read it in below script?

az ml compute create --file compute.yml --resource-group my-resource-group --workspace-name my-workspace

https://learn.microsoft.com/en-us/training/modules/explore-developer-tools-for-workspace-interaction/4-explore-cli

Azure | Azure Training
0 comments No comments
{count} votes

Accepted answer
  1. RNareddy 2,505 Reputation points Microsoft External Staff Moderator
    2023-12-18T10:17:45.13+00:00

    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".


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.