Path1.Mod2.a - Explore Workspace Developer Tools - Azure ML with CLI Flashcards

1
Q

R C CICD

Advantages of using Azure CLI in ML

A
  • Repeatability - Automate creation/config of assets and resources
  • Consistency - For assets and resources that are replicated across multiple Environments
  • CI/CD Workflows - Incorporate ML Asset configuration in DevOps workflows
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Azure CLI Installation is based on which Environment you’re installing on (Dev, QA, Prod, etc.) (T/F)

A

False. It’s based on which platform (Operating System) you choose to install it on (Windows, MacOS, OpenSUSE, Ubuntu/Debian, Azure Linux, etc).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You don’t need to install Azure CLI if you use Azure Cloud Shell, but you need to install it when using the Azure CLI Docker Container. The Docker Image is set up to support Azure CLI but you still need to install your target version. (T/F)

A

False. BOTH Azure Cloud Shell and the Azure CLI Docker Container already have Azure CLI preinstalled.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

To manage Azure ML Resoures through CLI, you need only access it their CLI functions via the "ml" command. Example, to see help topics: az ml -h (T/F)

A

False. First you need to install the Azure ML Extension:

`az extension add -n ml -y`
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

CLI v2 YAML Schemas are used for …

A

Microsoft has a list of CLI v2 YAML schemas for defining configurations for CLI creation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Azure CLI v2 YAML Schema File layout

A

The file must specify schema to use, then individual properties of the configuration like name, type, etc. . Ex: a compute.yml file

$schema: https://azuremlschemas.azureedge.net/latest/amlCompute.schema.json 
name: aml-cluster
type: amlcompute
size: STANDARD_DS3_v2
min_instances: 0
max_instances: 5
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Azure CLI v2 YAML command line usage (in CLI syntax) for creating entities

A

Given a compute.yaml file that uses CLI v2 schemas, you can use it as such

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

The general command format is:

az ml <the type to create> create 
--file <yaml file location> 
--resource-group or -g <resource group>
--workspace-name or -w  <workspace>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Azure CLI command for creating a Workspace, no YAML file…note which four resources are auto created when creating a workspace!!!

A

‘g’ is the Resource Group to add the ML resource to

az ml workspace create --name "mlw-dp100-labs" -g "rg-dp100-labs-02"

  • Log Analytics
  • Storage
  • Key Vault
  • Insights
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Azure CLI command for creating a Compute Instance, no YAML file and the specific type required

A

az ml compute create --name "mlc-dp100-labs-02" --size STANDARD_DS11_V2 -type ComputeInstance -w mlw-dp100-labs-02 -g rg-dp100-labs-02

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Azure CLI command for creating a Compute Cluster, no YAML file and the specific type required

A

Note the difference with the--type parameter; it’s AmlCompute for Clusters vs ComputeInstance for single Instances. You must also specify --max-instances for the Cluster:
<br></br>
az ml compute create --name "mlcluster-dp100-labs" --size STANDARD_DS11_V2 --type AmlCompute --max-instances 2 -w mlw-dp100-labs-02 -g rg-dp100-labs-02

How well did you know this?
1
Not at all
2
3
4
5
Perfectly