34.3b Azure Machine Learning: workspaces, compute clusters, and MLflow integration

📦 Virtualization and Cloud 📖 Cloud AI Infrastructure

🧭 Context Introduction

Azure Machine Learning (Azure ML) is a cloud-based platform that helps engineers build, train, and deploy machine learning models without managing the underlying infrastructure. Think of it as a complete workshop for AI projects — you get a dedicated workspace, tools to scale up your training, and a way to track all your experiments. This topic covers three essential components: workspaces (your project hub), compute clusters (your training power), and MLflow integration (your experiment tracker).


📦 Azure Machine Learning Workspaces

A workspace is the top-level resource in Azure ML. It acts as a central place where you manage all your machine learning assets — datasets, models, experiments, and compute resources.

Key characteristics of a workspace:

  • Central hub — Every Azure ML project starts with creating a workspace
  • Resource container — Holds all your training scripts, data references, and trained models
  • Access control — You can assign different permissions to different team members
  • Versioning — Automatically tracks versions of datasets, models, and environments

What a workspace contains:

  • Datastores — Connections to Azure storage accounts where your data lives
  • Datasets — References to specific data files or folders
  • Environments — Pre-configured Python environments with dependencies
  • Models — Registered versions of your trained models
  • Endpoints — Deployment targets for real-time or batch inference

How engineers interact with a workspace:

  • Through the Azure portal (web interface)
  • Using the Azure ML SDK (Python library)
  • Via the Azure CLI with ML extensions
  • Through Azure ML Studio (visual interface)

⚙️ Compute Clusters

Compute clusters are the workhorses of Azure ML. They provide scalable CPU or GPU resources for training models. Instead of buying and maintaining physical servers, you spin up clusters when needed and shut them down when done.

Types of compute targets in Azure ML:

  • Compute Instance — A single virtual machine for development and testing
  • Compute Cluster — A group of VMs that auto-scales for training jobs
  • Inference Cluster (AKS) — For deploying models as web services
  • Attached Compute — Connect existing VMs or Databricks clusters

How compute clusters work:

  • Auto-scaling — The cluster grows from 0 to N nodes when a training job starts
  • Idle shutdown — Nodes automatically shut down after a set idle time to save costs
  • Node types — Choose from CPU-only (Standard_D series) or GPU (Standard_NC, ND series)
  • Priority — Use low-priority VMs for cost savings (can be preempted)

Common use cases:

  • Training deep learning models on multiple GPUs
  • Running hyperparameter tuning sweeps across many nodes
  • Processing large datasets with distributed training

📊 Visual Representation: Azure ML Workspace workspace layout

This diagram displays Azure ML Workspace components: orchestrating compute instances, datasets, and pipelines.

flowchart LR Workspace["Azure ML Workspace"] --> Compute["Compute Clusters (A100 VM pools)"] Workspace --> Datastore["Datastores (Azure Blob Storage)"] Workspace --> Run["Jobs / Pipelines (Run execution logs)"] classDef cpu fill:#eafaf1,stroke:#76b900,stroke-width:2px,rx:6px,ry:6px; classDef memory fill:#f0f7ff,stroke:#3498db,stroke-width:1.5px,rx:4px,ry:4px; classDef system fill:#f1f5f9,stroke:#64748b,stroke-width:1.5px; class Workspace cpu; class Compute,Datastore,Run memory;

📊 MLflow Integration

MLflow is an open-source platform for managing the machine learning lifecycle. Azure ML integrates deeply with MLflow, giving you experiment tracking, model registry, and deployment capabilities.

What MLflow brings to Azure ML:

  • Experiment tracking — Log parameters, metrics, and artifacts for every training run
  • Model registry — Version and manage trained models in a central repository
  • Reproducibility — Automatically capture the code, data, and environment for each run
  • Deployment — Deploy models from MLflow format directly to Azure ML endpoints

How MLflow integration works in Azure ML:

Setting up tracking: - Azure ML workspace provides a built-in MLflow tracking server - You configure your training script to use the workspace's tracking URI - All logged metrics and artifacts appear in both MLflow UI and Azure ML Studio

Logging experiments: - Use MLflow's Python API to log parameters, metrics, and models - Azure ML automatically tags each run with workspace metadata - Compare runs visually in Azure ML Studio or MLflow UI

Model management: - Register models from MLflow runs into Azure ML Model Registry - Models are stored in MLflow format for portability - Deploy registered models to Azure ML endpoints with one click

Comparison: MLflow standalone vs. Azure ML with MLflow

Feature Standalone MLflow Azure ML + MLflow
Tracking server Self-hosted or managed Built-in, no setup needed
Compute scaling Manual Auto-scaling clusters
Model deployment Limited options Full Azure deployment services
Access control Basic Azure RBAC integration
Cost tracking None Built-in cost reporting
Data versioning Not included Integrated with Azure Databricks

🛠️ Practical Workflow Example

Here is how an engineer would typically use these three components together:

Step 1: Create a workspace - Use the Azure portal or CLI to create a new Azure ML workspace - This creates the container for all your work

Step 2: Set up a compute cluster - Define a cluster with GPU nodes for training - Set minimum nodes to 0 and maximum to 4 for cost efficiency - Configure idle time to 10 minutes before shutdown

Step 3: Configure MLflow tracking - Set the MLflow tracking URI to your Azure ML workspace - This connects your local or remote training scripts to the workspace

Step 4: Run experiments - Write a training script that uses MLflow to log metrics - Submit the script to the compute cluster - Monitor progress in Azure ML Studio

Step 5: Register and deploy - Find the best run in the experiment - Register the model to the workspace registry - Deploy the model to an endpoint for real-time predictions


🕵️ Key Benefits for Engineers

  • No infrastructure management — Focus on model development, not server maintenance
  • Cost control — Pay only for compute when training is running
  • Collaboration — Share workspaces, datasets, and models with team members
  • Reproducibility — Every experiment is fully captured and repeatable
  • Scalability — Start with a single node, scale to hundreds without code changes
  • Integration — Works with existing MLflow workflows and tools

✅ Summary

Azure Machine Learning provides a complete platform for AI infrastructure and operations. The workspace is your project hub, compute clusters give you on-demand training power, and MLflow integration brings industry-standard experiment tracking and model management. Together, these three components let engineers build, train, and deploy machine learning models at scale without worrying about the underlying cloud infrastructure.