23 Azure Ml

Chapter 23: Azure ML Overview🔗

Azure ML is Microsoft's managed ML platform, deeply integrated with Azure DevOps and Microsoft services.


Key Azure ML Components🔗

Azure ML Studio (web UI)
  ├── Datasets          → register and version data
  ├── Experiments       → track training runs
  ├── Models            → registry
  ├── Endpoints         → online + batch serving
  ├── Pipelines         → workflow orchestration
  ├── Environments      → Docker image management
  └── Compute           → training + inference clusters

Responsible AI Dashboard (Azure ML Unique Feature)🔗

Azure ML includes a built-in Responsible AI Dashboard for:
- Fairness assessment
- Error analysis (where does the model fail?)
- SHAP explanations
- Counterfactual analysis
- Causal analysis

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

client = MLClient(
    credential=DefaultAzureCredential(),
    subscription_id="...",
    resource_group_name="ml-rg",
    workspace_name="my-ml-workspace",
)

from azure.ai.ml import command, Input

job = command(
    code="./src",
    command="python train.py --lr ${{inputs.lr}}",
    inputs={"lr": Input(type="number", default=0.05)},
    environment="azureml:sklearn-env:1",
    compute="gpu-cluster",
    display_name="churn-training",
)

returned_job = client.jobs.create_or_update(job)

Next → Chapter 24: Multi-Cloud MLOps