Skip to main content

Training Job

Overview

A training job in Azure Machine Learning is an individual, isolated execution of code that trains a machine learning model. It runs in a managed compute environment, logs metrics and artifacts, and can be tracked using MLflow for reproducibility and experiment tracking.

Examples

Single-step command component

Description

Task Description: Authentication Token for Managed User Assigned Identity in Azure ML Pipelines

The notebook example is a single-step operation designed to run a secure task — in this case, token retrieval using a user-assigned managed identity — within an Azure ML pipeline.

This notebook:

  • Creates a single-step command component inside a pipeline
  • The component’s sole job is to retrieve an authentication token for a given Azure resource (via Managed Identity)
  • Submits a pipeline job using ml_client.jobs.create_or_update(...)
  • Does not train a model or perform inference, but it executes a valid AML job pipeline

Instructions

  1. Go to the repository with the notebook example:

  2. Copy the get-token-example.ipynb notebook to your development environment in AI platform.

  3. Before running the training job example, ensure your environment is properly set up and the few configuration values (like workspace and compute names) are filled in.

  4. Follow the instructions in the notebook and run the code cells.

Single-step model training and registration

Description

Train and register a machine learning model

This notebook demonstrates how to train and register a model using an Azure ML command job.

This notebook:

  • Connects to an Azure ML workspace
  • Defines a custom environment
  • Submits a single command job using command(...)
  • Trains a regression model (Boston housing example)
  • Registers the trained model as a Model object in the Azure ML model registry
  • Prepares the model for downstream deployment (referenced in other notebooks)

Instructions

  1. Go to the repository with the notebook example:
  1. Copy the train-on-ai-platform-aks.ipynb notebook to your development environment in AI platform.

  2. Before running the training job example, ensure your environment is properly set up and the few configuration values (like workspace and compute names) are filled in.

  3. Follow the instructions in the notebook and run the code cells.