Data and Compute Services for ML
Complete the full lesson to earn 25 points
Work through each section, then tap “Mark as Complete” on the last one.
Module: Machine Learning Fundamentals on Azure
Section: Azure Machine Learning Capabilities
Lesson: Data and Compute Services for ML
Welcome to this lesson on Data and Compute Services for Machine Learning on Azure. As you delve deeper into building and deploying machine learning models, understanding how to effectively manage your data and leverage appropriate computational resources becomes paramount. Azure Machine Learning provides a suite of powerful services designed to handle these critical aspects of the ML lifecycle, from data ingestion and preparation to training complex models on scalable infrastructure. Mastering these services will not only streamline your ML workflows but also ensure that your projects are efficient, cost-effective, and capable of handling the demands of real-world applications.
In this lesson, we will explore the core Azure services that underpin data management and computational power within Azure Machine Learning. We'll cover how to store, access, and prepare your datasets, and then discuss the various compute options available for training and deploying your models. By the end of this session, you'll have a solid grasp of how to choose and utilize the right data and compute resources to accelerate your machine learning journey on Azure.
Understanding Data Management in Azure ML
Effective data management is the bedrock of any successful machine learning project. Without clean, accessible, and well-organized data, even the most sophisticated algorithms will struggle to produce meaningful results. Azure Machine Learning offers several integrated ways to handle your data, ensuring it's readily available and prepared for your ML tasks.
Azure Machine Learning Datastores
Datastores are your primary interface for connecting to data storage services in Azure. They act as a reference to a specific location and credential for your data, abstracting away the complexities of direct connection strings or authentication. This abstraction is crucial for security and ease of use, allowing you to manage access permissions centrally.
When you create a datastore, you're essentially telling Azure ML where your data resides and how to authenticate to access it. This could be an Azure Blob Storage container, an Azure Data Lake Storage Gen2 account, an Azure SQL Database, or even an Azure File Share. The datastore itself doesn't store the data; it merely points to it.
Common Datastore Types:
- Azure Blob Storage: Ideal for unstructured data like images, text files, or logs. It's cost-effective and highly scalable.
- Azure Data Lake Storage Gen2 (ADLS Gen2): Built on Azure Blob Storage, ADLS Gen2 is optimized for big data analytics workloads. It offers hierarchical namespace capabilities, making it easier to organize large datasets and manage access control at a granular level.
- Azure SQL Database: Suitable for structured data residing in relational databases. You can connect to your existing SQL databases to pull data for ML training.
- Azure File Share: Useful for shared file system access, often used for smaller datasets or configurations.
Creating a Datastore:
You can create datastores through the Azure Machine Learning studio, the Azure CLI, or Python SDK. Using the Python SDK provides the most programmatic control and is often preferred for reproducible workflows.
Here's a Python example of creating a datastore pointing to an Azure Blob Storage container:
from azure.ai.ml import MLClient
from azure.ai.ml.entities import AzureBlobDatastore, Datastore
from azure.identity import DefaultAzureCredential
# Authenticate to your Azure ML workspace
ml_client = MLClient(
credential=DefaultAzureCredential(),
subscription_id="YOUR_SUBSCRIPTION_ID",
resource_group_name="YOUR_RESOURCE_GROUP",
workspace_name="YOUR_WORKSPACE_NAME"
)
# Define the details for your blob storage
blob_storage_name = "your_blob_storage_account_name"
blob_container_name = "your_container_name"
account_key = "YOUR_STORAGE_ACCOUNT_KEY" # Consider using Azure Key Vault for secrets
# Create an Azure Blob Datastore object
# The 'container_name' specifies the specific container within the storage account
# The 'account_name' is the name of your Azure Storage Account
# The 'protocol' is typically 'https'
# The 'endpoint' is the fully qualified domain name of the storage account
blob_datastore = AzureBlobDatastore(
name="my_blob_datastore",
description="Datastore for my blob storage data",
container_name=blob_container_name,
account_name=blob_storage_name,
protocol="https",
# For account key authentication, you'd typically pass it here.
# However, it's HIGHLY recommended to use Azure Key Vault for storing secrets.
# account_key=account_key # Example, but avoid direct use
)
# Create the datastore in Azure ML
ml_client.datastores.create_or_update(blob_datastore)
print(f"Datastore 'my_blob_datastore' created successfully.")
Explanation:
MLClient: This is the primary client object for interacting with Azure ML resources using the Python SDK. You authenticate usingDefaultAzureCredential, which automatically tries various authentication methods (environment variables, managed identity, Azure CLI, etc.).AzureBlobDatastore: This class defines the configuration for connecting to Azure Blob Storage. You provide a name for your datastore within Azure ML, a description, the specific container name, the storage account name, and the protocol.- Authentication: The example comments on using
account_key. It's critical to manage secrets securely. Instead of hardcoding keys or passing them directly, use Azure Key Vault to store your storage account key and retrieve it securely when creating or using the datastore. create_or_update: This method registers the datastore with your Azure ML workspace. If a datastore with the same name already exists, it will be updated.
Callout: Datastores vs. Direct Access
Datastores abstract the connection details and credentials. This means your ML pipelines and scripts don't need to know the raw connection strings or keys. They simply refer to the datastore by name. This improves security, maintainability, and portability of your ML code. If your storage credentials change, you only need to update the datastore configuration in Azure ML, not every script that uses it.
Azure Machine Learning Datasets
While datastores point to storage locations, datasets are Azure ML's way of representing specific data assets within those locations. Datasets provide a versioned view of your data, allowing you to track changes over time and easily revert to previous versions. They are fundamental for reproducible ML experiments.
Azure ML supports two main types of datasets:
- Tabular Datasets: Represent data in a structured, table-like format. These are ideal for training models with structured data, such as CSV files, Parquet files, or data from SQL databases. They can be loaded into Pandas DataFrames or Spark DataFrames.
- File Datasets: Represent a collection of files, such as images, audio files, or text documents. These are useful for working with unstructured or semi-structured data. A file dataset can point to a directory of files or a specific set of files.
Creating Datasets:
You can create datasets from existing datastores. This process registers a specific path or query within a datastore as a versioned data asset in your workspace.
Here's an example of creating a Tabular Dataset from a CSV file in an Azure Blob datastore using the Python SDK:
from azure.ai.ml import MLClient
from azure.ai.ml.entities import Dataset, DataPattern, DataType
from azure.identity import DefaultAzureCredential
# Authenticate to your Azure ML workspace
ml_client = MLClient(
credential=DefaultAzureCredential(),
subscription_id="YOUR_SUBSCRIPTION_ID",
resource_group_name="YOUR_RESOURCE_GROUP",
workspace_name="YOUR_WORKSPACE_NAME"
)
# Get the reference to your previously created datastore
blob_datastore_name = "my_blob_datastore" # Name of the datastore created earlier
# Define the path to your CSV file within the datastore
# This path is relative to the root of the container specified in the datastore
csv_file_path = "data/my_training_data.csv"
# Create a Tabular Dataset
tabular_dataset = Dataset(
path=f"azureml://datastores/{blob_datastore_name}/paths/{csv_file_path}",
type=DataType.TABULAR,
name="my_tabular_csv_dataset",
description="My training data from a CSV file",
version="1.0" # Explicitly set a version
)
# Register the dataset in Azure ML
ml_client.datasets.create_or_update(tabular_dataset)
print(f"Tabular Dataset 'my_tabular_csv_dataset' version 1.0 created successfully.")
# Example of creating a File Dataset from a directory
# file_dataset = Dataset(
# path=f"azureml://datastores/{blob_datastore_name}/paths/images/", # Points to the 'images' directory
# type=DataType.FILE,
# name="my_image_dataset",
# description="Dataset of training images",
# version="1.0"
# )
# ml_client.datasets.create_or_update(file_dataset)
# print(f"File Dataset 'my_image_dataset' version 1.0 created successfully.")
Explanation:
Dataset: This class is used to define a dataset asset.path: This is the crucial part. Theazureml://URI format is used to reference data. It specifies the datastore and the path within that datastore. For Tabular datasets, this typically points to a file or a set of files that can be interpreted as a table. For File datasets, it points to a directory or a specific set of files.type: Specifies whether it'sDataType.TABULARorDataType.FILE.name,description,version: These metadata fields help in organizing and versioning your datasets. Versioning is key for experiment reproducibility.create_or_update: Registers the dataset with your workspace.
Callout: Data Versioning is Crucial
Machine learning models are sensitive to the data they are trained on. If you retrain a model using a different version of the data, you might get different results. Azure ML's dataset versioning allows you to track exactly which data was used for a specific training run. This is invaluable for debugging, auditing, and ensuring that your results are reproducible. When you create a dataset with the same name but a different version number, Azure ML keeps both versions, allowing you to select the specific one you need.
Data Preparation and Transformation
Once your data is registered as a dataset, you'll often need to clean, transform, or feature engineer it before feeding it into a model. Azure ML provides several ways to achieve this, often integrated into your ML pipelines.
- Data Preparation in Code: You can write Python scripts using libraries like Pandas or Spark (if using a Spark compute target) to perform transformations. These scripts can then be run as steps in an Azure ML pipeline.
- Azure Databricks Integration: For large-scale data transformations, Azure Databricks offers a powerful Apache Spark-based analytics platform that integrates seamlessly with Azure ML. You can use Databricks notebooks to prepare your data and then register it as an Azure ML dataset.
- Azure Data Factory Integration: Azure Data Factory is a cloud-based ETL and data integration service. You can use it to orchestrate data movement and transformation pipelines, preparing data before it's consumed by Azure ML.
Example: Data Preparation Script for a Pipeline Step
Imagine you have a script prepare_data.py that takes an input CSV dataset, performs some cleaning (e.g., handling missing values, scaling), and outputs a processed CSV file.
# prepare_data.py
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
import argparse
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("--input_data", type=str, help="Path to the input data CSV file")
parser.add_argument("--output_train", type=str, help="Path for the output training CSV file")
parser.add_argument("--output_test", type=str, help="Path for the output test CSV file")
args = parser.parse_args()
return args
def main():
args = parse_args()
print(f"Loading data from: {args.input_data}")
df = pd.read_csv(args.input_data)
# Basic data cleaning: Handle missing values (example: fill with mean)
for col in df.columns:
if df[col].isnull().any():
mean_val = df[col].mean()
df[col].fillna(mean_val, inplace=True)
print(f"Filled missing values in column '{col}' with mean ({mean_val}).")
# Feature scaling (example for numerical columns)
numerical_cols = df.select_dtypes(include=['float64', 'int64']).columns
scaler = StandardScaler()
df[numerical_cols] = scaler.fit_transform(df[numerical_cols])
print("Applied StandardScaler to numerical features.")
# Split data into training and testing sets
train_df, test_df = train_test_split(df, test_size=0.2, random_state=42)
# Save the processed data
print(f"Saving training data to: {args.output_train}")
train_df.to_csv(args.output_train, index=False)
print(f"Saving test data to: {args.output_test}")
test_df.to_csv(args.output_test, index=False)
print("Data preparation complete.")
if __name__ == "__main__":
main()
This script can then be registered as a command-line job in Azure ML, taking the input dataset and outputting processed datasets.
Compute Services for Machine Learning on Azure
Training machine learning models can be computationally intensive. Azure ML provides a flexible and scalable compute infrastructure to meet these demands, from small development machines to large distributed clusters. Choosing the right compute target is crucial for performance, cost, and efficiency.
Understanding Azure ML Compute Targets
Azure ML compute targets are the environments where your code runs. These can be various types of Azure compute resources that you attach to your workspace.
Types of Compute Targets:
Compute Instances:
- What it is: A fully managed cloud-based workstation that you can use for development, training, and testing. It comes pre-installed with ML tools and libraries.
- Use Cases: Ideal for interactive development, data exploration, debugging scripts, and running small to medium-sized training jobs. It's like having a powerful development machine in the cloud.
- Management: Fully managed by Azure ML. You start, stop, and resize it.
- Cost: Billed per hour while running.
Compute Clusters:
- What it is: A managed cluster of virtual machines (VMs) that can scale up or down automatically based on the workload. You can configure the minimum and maximum number of nodes.
- Use Cases: Suitable for batch training jobs, hyperparameter tuning, and running large-scale model training that requires parallel processing. It's designed for heavy-duty computation.
- Management: Managed by Azure ML. Auto-scaling is a key feature.
- Cost: Billed per hour for each node running. You pay for what you use, and scaling down can save costs.
Inference Clusters (Managed or Kubernetes):
- What it is: Clusters designed for deploying and hosting your trained models for real-time inference.
- Azure Kubernetes Service (AKS): A managed Kubernetes service that provides a robust platform for container orchestration and scalable model deployment.
- Azure Container Instances (ACI): A simpler way to deploy single containers for testing or low-scale inference. It's often used for quick testing of deployed endpoints.
- Use Cases: Real-time scoring of predictions, microservices, and scalable model serving.
- Management: AKS requires more management overhead; ACI is simpler for specific use cases.
- Cost: Varies based on the underlying compute resources and usage.
- What it is: Clusters designed for deploying and hosting your trained models for real-time inference.
Databricks Compute:
- What it is: An Apache Spark-based analytics platform integrated with Azure ML.
- Use Cases: Large-scale data preparation and feature engineering using Spark, and distributed model training on massive datasets.
- Management: Managed by Azure Databricks, but configured and accessed through Azure ML.
- Cost: Based on Azure Databricks pricing.
Creating and Attaching Compute Targets:
You can create and manage compute targets through the Azure ML studio or the Python SDK.
Here's how to create a Compute Instance and a Compute Cluster using the Python SDK:
from azure.ai.ml import MLClient
from azure.ai.ml.entities import ComputeInstance, AmlCompute
from azure.identity import DefaultAzureCredential
# Authenticate to your Azure ML workspace
ml_client = MLClient(
credential=DefaultAzureCredential(),
subscription_id="YOUR_SUBSCRIPTION_ID",
resource_group_name="YOUR_RESOURCE_GROUP",
workspace_name="YOUR_WORKSPACE_NAME"
)
# --- Create a Compute Instance ---
# Name for the compute instance
ci_name = "dev-ci-instance"
# Define the Compute Instance configuration
# vm_size: Choose a VM size appropriate for your development needs (e.g., Standard_DS3_v2)
# ssh_public_access: Enable if you need SSH access
compute_instance = ComputeInstance(
name=ci_name,
size="Standard_DS3_v2",
ssh_public_access=True,
# You can specify tags, location, etc.
)
# Create the compute instance
try:
ml_client.compute.begin_create_or_update(compute_instance).result()
print(f"Compute instance '{ci_name}' created successfully.")
except Exception as e:
print(f"Error creating compute instance '{ci_name}': {e}")
# --- Create a Compute Cluster ---
# Name for the compute cluster
cluster_name = "training-cluster"
# Define the Compute Cluster configuration
# vm_size: Choose a VM size suitable for training (e.g., Standard_NC6s_v3 for GPU)
# min_instances: Minimum number of nodes (e.g., 0 for scale-to-zero)
# max_instances: Maximum number of nodes (e.g., 5 for scaling up)
# idle_time_before_scale_down: How long to wait before scaling down idle nodes
compute_cluster = AmlCompute(
name=cluster_name,
size="Standard_DS3_v2", # Example CPU-based VM size
min_instances=0,
max_instances=4,
idle_time_before_scale_down=120, # Scale down after 120 seconds of inactivity
# For GPU, use a size like "Standard_NC6s_v3"
# gpu_cluster = AmlCompute(name=cluster_name, size="Standard_NC6s_v3", min_instances=0, max_instances=2)
)
# Create the compute cluster
try:
ml_client.compute.begin_create_or_update(compute_cluster).result()
print(f"Compute cluster '{cluster_name}' created successfully.")
except Exception as e:
print(f"Error creating compute cluster '{cluster_name}': {e}")
Explanation:
ComputeInstance: Defines a managed workstation. You specify its name and VM size.ssh_public_accessallows you to connect via SSH if needed.AmlCompute: Defines a managed compute cluster. You specify:name: The name of the cluster.size: The VM size for the nodes in the cluster. Choose based on your compute needs (CPU, GPU, memory).min_instances: The minimum number of nodes. Setting to 0 allows the cluster to scale down to zero when not in use, saving costs.max_instances: The maximum number of nodes the cluster can scale up to. This determines the maximum parallel processing capacity.idle_time_before_scale_down: Configures how long nodes remain idle before being de-provisioned to save costs.
begin_create_or_update().result(): This initiates the creation/update process and waits for it to complete.
Callout: Choosing the Right VM Size
The
vm_sizeparameter is critical for both performance and cost.
- CPU-based VMs (e.g.,
Standard_DS3_v2,Standard_D12_v2): Good for general-purpose tasks, data processing, and many traditional ML algorithms.- GPU-enabled VMs (e.g.,
Standard_NC6s_v3,Standard_ND40rs_v2): Essential for deep learning models (CNNs, RNNs, Transformers) and other computationally intensive tasks that can leverage parallel processing on GPUs.- Memory-optimized VMs (e.g.,
Standard_E16s_v3): Useful when your dataset or model requires a large amount of RAM.Always consider the specific requirements of your workload. Start with a reasonable size and scale up or use more powerful instances if performance is insufficient. Monitor costs closely.
Integrating Compute with ML Jobs
Once you have your compute targets set up, you need to tell Azure ML which compute resource to use when running your ML jobs (like training scripts or batch inference). This is done when you define your job submission.
Example: Submitting a Training Job to a Compute Cluster
Let's assume you have a Python training script train.py that you want to run on the training-cluster you created.
# train.py (simplified example)
import argparse
import pandas as pd
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
import joblib # For saving the model
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("--training_data", type=str, required=True, help="Path to the training data CSV")
parser.add_argument("--model_output", type=str, required=True, help="Path to save the trained model")
args = parser.parse_args()
return args
def main():
args = parse_args()
print(f"Loading training data from: {args.training_data}")
# Note: In a real pipeline, training_data path might be an MLTable or a folder
# Here, assuming it's a path to a CSV file provided by the pipeline
train_df = pd.read_csv(args.training_data)
# Assuming 'target_column' is the name of your target variable
# and other columns are features
X = train_df.drop('target_column', axis=1)
y = train_df['target_column']
# Simple train/test split for demonstration (in a pipeline, test data might be separate)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
print("Training Logistic Regression model...")
model = LogisticRegression(solver='liblinear', random_state=42)
model.fit(X_train, y_train)
# Evaluate the model
y_pred = model.predict(X_test)
accuracy = accuracy_score(y_test, y_pred)
print(f"Model accuracy on test set: {accuracy:.4f}")
# Save the model
print(f"Saving model to: {args.model_output}")
# Ensure the output directory exists (Azure ML handles this for registered outputs)
joblib.dump(model, args.model_output)
print("Model training complete.")
if __name__ == "__main__":
main()
Now, submitting this script as a job using the Python SDK:
from azure.ai.ml import MLClient, command
from azure.ai.ml.entities import Data, Environment
from azure.identity import DefaultAzureCredential
from azure.ai.ml.constants import AssetTypes
# Authenticate to your Azure ML workspace
ml_client = MLClient(
credential=DefaultAzureCredential(),
subscription_id="YOUR_SUBSCRIPTION_ID",
resource_group_name="YOUR_RESOURCE_GROUP",
workspace_name="YOUR_WORKSPACE_NAME"
)
# --- Define the compute target ---
compute_target_name = "training-cluster" # The cluster we created earlier
# --- Define the input dataset ---
# Assuming 'my_tabular_csv_dataset' is a registered dataset from earlier
input_dataset_name = "my_tabular_csv_dataset"
input_dataset_version = "1.0" # Or the specific version you want to use
# Reference the dataset as an input to the job
input_data_asset = Data(
path=f"azureml://datastores/workspaceblobstore/paths/{input_dataset_name}/{input_dataset_version}", # This format is for registered datasets
type=AssetTypes.MLTABLE # Or AssetTypes.URI_FILE, AssetTypes.URI_FOLDER depending on your data type
)
# If you're using a direct datastore path instead of a registered dataset:
# input_data_path = f"azureml://datastores/my_blob_datastore/paths/data/processed_training_data.csv"
# input_data_asset = input_data_path
# --- Define the environment ---
# Use a curated environment or create your own
# This example uses a curated environment for scikit-learn
env_name = "AzureML-sklearn-1.0-ubuntu20.04-py38-cpu"
environment = ml_client.environments.get(name=env_name, version="latest")
# --- Define the command job ---
job = command(
code="./src", # Local directory containing your train.py script
command="python train.py --training_data ${{inputs.training_data}} --model_output ${{outputs.model_output}}",
inputs={
"training_data": input_data_asset
},
outputs={
"model_output": {"type": AssetTypes.URI_FOLDER} # Output will be saved to a folder
},
environment=f"{environment.name}:{environment.version}",
compute=compute_target_name,
display_name="logistic-regression-training",
experiment_name="mlops-training-runs"
)
# --- Submit the job ---
print("Submitting training job...")
returned_job = ml_client.jobs.create_or_update(job)
print(f"Job submitted. View it at: {returned_job.studio_url}")
Explanation:
compute: Specifies the name of the compute target (training-cluster) where the job will run.code="./src": Points to the directory containing your training script (train.py). Ensuretrain.pyis inside a folder namedsrcin your current working directory.command="...": The actual command to execute. We use"${{inputs.training_data}}"and"${{outputs.model_output}}"to reference the input data and the output path provided by Azure ML. Azure ML automatically mounts or downloads the input data to the specified path on the compute target and creates the output directory.inputs: Defines the input data for the job. We reference our registeredmy_tabular_csv_dataset. Azure ML will make this data available at the path specified bytraining_data.outputs: Defines the output artifacts.model_outputis configured as aURI_FOLDER, meaning Azure ML will create a folder on the compute target where your script can save its outputs. These outputs are then uploaded to the workspace's default datastore.environment: Specifies the runtime environment, including Python packages and system dependencies. Using curated environments simplifies setup.ml_client.jobs.create_or_update(job): Submits the job to Azure ML.
Best Practices for Data and Compute Management
- Use Datastores and Datasets: Always use Azure ML Datastores to abstract storage access and Datasets for versioning your data. This ensures reproducibility and simplifies credential management.
- Secure Your Secrets: Never hardcode storage account keys or other sensitive information. Use Azure Key Vault to store secrets and grant Azure ML managed identity access to retrieve them.
- Choose Compute Wisely:
- Use Compute Instances for interactive development and debugging.
- Use Compute Clusters for training and hyperparameter tuning, leveraging auto-scaling to manage costs.
- Use Inference Clusters (AKS/ACI) for deploying models.
- Leverage Auto-Scaling: Configure your Compute Clusters with appropriate
min_instancesandmax_instancesto balance cost and performance. Settingmin_instances=0can significantly reduce costs when the cluster is idle. - Monitor Costs and Performance: Regularly review your Azure costs associated with compute resources. Monitor job runtimes and resource utilization to identify bottlenecks or areas for optimization.
- Version Everything: Version your datasets and your training code. This is fundamental for MLOps and ensuring that you can reproduce any experiment or deployment.
- Use Environments: Define and version your compute environments using Azure ML Environments to ensure consistent runtime conditions across different runs and collaborators.
Common Pitfalls and How to Avoid Them
- Hardcoding Paths: Avoid hardcoding direct paths to storage accounts in your scripts. Use Azure ML Datastores and the
azureml://URI format. - Forgetting to Scale Down: Compute Clusters can incur costs even when idle if
min_instancesis set to a value greater than 0. Always setmin_instances=0for cost savings unless you have a specific need for a warm standby. - Using Inappropriate VM Sizes: Selecting a VM size that is too small can lead to long training times or out-of-memory errors. Selecting one that is too large can be unnecessarily expensive. Profile your workloads to find the right balance.
- Ignoring Data Versioning: Running training jobs without tracking the data version can lead to confusion when trying to reproduce results or debug model performance issues. Always use Azure ML Datasets.
- Insecure Credential Management: Storing access keys directly in code or configuration files is a major security risk. Use Azure Key Vault.
- Over-reliance on Compute Instances for Training: While convenient for development, Compute Instances are not designed for large-scale, long-running training jobs. They can be expensive and lack the auto-scaling capabilities of Compute Clusters.
Key Takeaways
By the end of this lesson, you should have a strong understanding of how Azure ML facilitates data and compute management for your machine learning projects. Here are the key takeaways:
- Datastores abstract your data storage locations (Blob, ADLS Gen2, etc.) and manage credentials securely.
- Datasets represent versioned data assets within your workspace, crucial for reproducibility and tracking experiments. Azure ML supports both Tabular and File datasets.
- Compute Instances are managed cloud workstations ideal for interactive development, exploration, and debugging.
- Compute Clusters (AmlCompute) are auto-scaling clusters of VMs designed for scalable training, hyperparameter tuning, and batch inference. They offer cost savings through scale-to-zero capabilities.
- Inference Clusters (AKS/ACI) are optimized for deploying trained models for real-time predictions.
- Choosing the correct VM size for your compute targets is critical for balancing performance and cost.
- Always prioritize security by using Azure Key Vault for secrets and reproducibility by versioning your data and code.
- Integrate data preparation and model training into Azure ML Pipelines to automate and orchestrate your workflows.
Mastering these fundamental data and compute services on Azure will provide you with the robust foundation needed to build, train, and deploy sophisticated machine learning solutions efficiently and reliably.
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles your daily points limit so you progress twice as fast, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× daily points limit
- ✓ Distraction-free lessons