Path1.Mod2.c - Explore Workspace Developer Tools - Python SDK Flashcards

1
Q

The command for installing the Python SDK package (using pip)

A

pip install azure-ai-ml

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

The min Python version required to install the Python ML SDK.

The Python ML SDK is already installed under these conditions

A

Minimum Python 3.7 to install the SDK

When using notebooks in Azure ML Studio and using Python 3.10 or later

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

MLClient class usage and four required Parameters

A

Use the MLClient constructor to authenticate and get a connected instance from your environment to your Workspace:

from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential

ml_client = MLClient(
    DefaultAzureCredential(), 
subscription_id, 
resource_group, 
workspace
)

Required Parameters:
- a TokenCredential instance (generally can use DefaultAzureCredential())
- subscription_id
- resource_group
- workspace_name

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

The purpose of having an MLClient instance connected to your Workspace

A

It authenticates your Environment, enabling interaction capabilities with your Workspace, and allowing creation and management of workspace assets and resources.

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

bcou cou fc

The three methods in the MLClient class for managing resources and the one that
- makes a blocking call
- makes an async call
- can be leveraged for Workspace Reuse

A
  • begin_create_or_update - Create or update an Azure ML Resource asynchronously
  • create_or_update - Create or update an Azure ML Resource, blocking
  • from_config - Return a workspace object from an existing Azure ML Workspace. Reads the Workspace config from a file, else throws an exception if one can’t be found. This one allows you to save then reuse your Workspace in different Python notebooks

Read MLClient

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

The DataStore classes for connecting your Workspace to:
- A Blob Datastore
- A Data Lake (two of them)
- File Datastore

A
  • AzureBlobDataStore
  • AzureDataLakeGen1Datastore
  • AzureDataLakeGen2Datastore
  • AzureFileDatastore

Read Classes

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

co com env cmp ex_na

command constructor for creating a Job as a Command

A

For a command:

from azure.ai.ml import command

job = command(
    code="./src",
    command="python train.py",
    environment="AzureML-sklearn-0.24-ubuntu18.04-py37-cpu@latest",
    compute="aml-cluster",
    experiment_name="train-model"
)

returned_job = ml_client.create_or_update(job)

Note that environment can be an environment image file specified by name, or an Environment instance.

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