Azure Machine Learning
Overview
Azure Machine Learning (Azure ML) is a cloud‑based service for building, training, and deploying machine learning models at scale. It provides a comprehensive, end‑to‑end platform that supports the entire ML lifecycle—from data ingestion and preparation to model management and monitoring.
- Automated ML (AutoML) for rapid model creation.
- Designer for drag‑and‑drop pipelines.
- Python SDK and CLI for advanced workflows.
- Managed compute resources (CPU, GPU, FPGA).
- Model registry and deployment to Azure Kubernetes Service, Azure Container Instances, or Edge devices.
Get Started
Follow these steps to create your first experiment using the Azure ML Python SDK.
# Install the Azure ML SDK
pip install azureml-core azureml-train
# Import required libraries
from azureml.core import Workspace, Experiment, ScriptRunConfig, Environment
# Connect to your Azure ML workspace
ws = Workspace.from_config()
# Create an experiment
experiment = Experiment(workspace=ws, name="hello-world")
# Define an environment
env = Environment(name="myenv")
env.python.user_managed_dependencies = False
env.python.conda_dependencies.add_pip_package("scikit-learn")
# Create a script run configuration
src = ScriptRunConfig(source_directory='src',
script='train.py',
compute_target='cpu-cluster',
environment=env)
# Submit the experiment
run = experiment.submit(src)
run.wait_for_completion(show_output=True)
Key Concepts
Compute Targets
Azure ML provides managed compute clusters, single‑node VM, and Azure Kubernetes Service for training and inference workloads.
Datasets
Datasets are versioned data assets that can be registered in the workspace and consumed by training scripts.
Model Management
Register models in the workspace to track versions, metadata, and deployment status.