fbpx
Faster Training and Inference Using the Azure Container for PyTorch in Azure ML Faster Training and Inference Using the Azure Container for PyTorch in Azure ML
By Beatriz Stollnitz, Principal Cloud Advocate at Microsoft If you’ve ever wished that you could speed up the training of a... Faster Training and Inference Using the Azure Container for PyTorch in Azure ML

By Beatriz Stollnitz, Principal Cloud Advocate at Microsoft

Azure Container for PyTorch (ACPT)

Benefits of the ACPT

How to use the ACPT to train a model within Azure ML

CONDA_PATH = Path(Path(__file__).parent, "conda.yml")    
    ...
    # Create the environment.
    environment = Environment(image="mcr.microsoft.com/azureml/" +
                              "openmpi4.1.0-ubuntu20.04:latest",
                              conda_file=CONDA_PATH)

    # Create the job.
    job = command(
        ...
        environment=environment,
        ...
    )
  ...
  environment = "AzureML-ACPT-pytorch-1.12-py39-cuda11.6-gpu@latest"

  job = command(
      ...
      environment=environment,
      ...
  )
environment = "AzureML-ACPT-pytorch-1.12-py39-cuda11.6-gpu:3"

job = command(
    ...
    environment=environment,
    ...
)

Additional Resources:

Deploy real-time machine learning services with Azure Machine Learning – Training | Microsoft Learn

Administer containers in Azure learning path – Training | Microsoft Learn

Part 1: Training and Deploying Your PyTorch Model in the Cloud with Azure ML

Part 2: Training Your PyTorch Model Using Components and Pipelines in Azure ML

Article originally posted here. Reposted with permission.

Bea Stollnitz

Bea Stollnitz is a principal developer advocate at Microsoft, focusing on Azure ML and other AI/ML technologies.

1