Knowledge Graph — Coursera Notes › Academic disciplines › Information Technology / Computer Science › Artificial Intelligence › Machine Learning & Data
Azure Machine Learning Service
service · part of Machine Learning & Data
Integrated environment for training, experimentation, and workflow management with no-code UI and SDKs, capable of deploying models as REST APIs.
It supports tracking, versioning, and reuse of data and models, and can leverage powerful cloud compute resources including GPUs for complex models.
Registering a dataset in Azure ML allows you to track, version, and reuse data across experiments. The process involves connecting to the workspace, accessing a datastore (e.g., default datastore), and using Dataset.Tabular.register_pandas_dataframe() or Dataset.File.upload_directory() to register the data. Registered datasets can be easily accessed and shared.
from azureml.core import Workspace, Datastore, Dataset
import pandas as pd
from io import StringIO
ws = Workspace.from_config()
datastore = ws.get_default_datastore()
data = pd.DataFrame({'Age': [25, 30, 35], 'Income': [50000, 60000, 70000], 'Target': [0, 1, 0]})
dataset = Dataset.Tabular.register_pandas_dataframe(data, target=datastore, name='trainingdata')
print('Dataset registered:', dataset.name)
A training script is a Python file that contains the code to be executed when a training job is submitted. It typically parses input arguments (e.g., via argparse), accesses the dataset by name using Run.get_context().input_datasets['trainingdata'], converts it to a pandas DataFrame, and performs model training. The script should be saved as a .py file (e.g., train.py) in the workspace.
# train.py
import argparse
import pandas as pd
from azureml.core import Run
parser = argparse.ArgumentParser()
parser.add_argument('--data', type=str)
args = parser.parse_args()
run = Run.get_context()
dataset = run.input_datasets['trainingdata']
df = dataset.to_pandas_dataframe()
print('Data loaded successfully:', df.shape)
When creating a compute target, consider selecting a VM size with appropriate resources for your model's complexity. For small models, standard CPUs may suffice; for complex models (e.g., deep learning), GPUs or more powerful VMs are necessary to reduce training time. CPU speed and number of cores significantly affect training speed.
Inside Azure Machine Learning Service (8)
- Azure ML SDK — A tool for lifecycle support including retraining without service disruption.
- Azure ML authentication methods — Azure Machine Learning supports multiple authentication methods to secure access to workspaces and resources.
- Azure ML Compute Instance — A compute instance is a fully managed cloud workstation optimized for machine learning.
- Azure ML Datastore — A datastore in Azure ML is a reference to an existing Azure storage account (e.g., Blob, ADLS).
- Azure ML Environment — An environment in Azure ML defines the Python packages and dependencies needed for a training or deployment script.
- Azure ML Experiment — An experiment in Azure ML is a grouping of many runs from a specified script.
- Azure ML ScriptRunConfig — ScriptRunConfig is used to configure a training run.
- Azure ML Workspace — An Azure ML workspace is the top-level resource for Azure Machine Learning.
Connections
- Uses Azure Kubernetes Service (AKS)
- Uses Azure Monitor
- Related to Azure ML SDK
- Alternative to Azure Kubernetes Service (AKS)
- Related to Azure ML SDK
- Related to Azure Kubernetes Service (AKS)
- Related to Azure Monitor
Also known as: Azure Machine Learning Service, Machine Learning Service
This is the text view of an interactive 3D knowledge graph — open this page with JavaScript enabled to explore it visually.