Skip to content

Asset naming convention

Louie Larson edited this page May 3, 2023 · 21 revisions

General

These conventions apply to all assets, regardless of type. Names must:

  • Start with a letter.
  • Use only lowercase letters, numbers, dashes, and periods.
  • Be up to 255 characters long.
  • Use dashes to separate words. Underscores are currently used for components due to an SDK limitation.
  • Not include prefixes like "azureml" or "microsoft". Registries containing these assets will already provide this information.
  • Not include the type of asset as a suffix (examples: "component" or "environment"). The asset type is already clearly represented via CLI, SDK, and UI.
  • Not include a version number of the asset. Versions of included packages and frameworks are okay though.

Examples of valid asset names:

Name Notes
tremendous-transform Starts with a letter, uses lowercase letters and a dash
pytorch-1.9-cuda11.6-gpu Version numbers refer to PyTorch and CUDA, not the asset itself

Examples of invalid asset names:

Name Issue
microsoft-master-transform Stars with "microsoft" prefix
awesome_component Ends with "component"
fastsupertransform Words aren't separated by dashes
1-amazing-sort Doesn't start with a letter
pattern-detect-2.0 Asset version should be in its version, not its name

Components

If you have a lot of related components, consider using a prefix to help group them. For example: forecast-preprocessing, forecast-threat-model, etc.

Environments

Your environment will need a meaningful name that will make it easy to find. Follow the naming convention below for framework-based environments:

<framework>-<framework-version>[-<os><os-version>][-py<python-version>][{-<gpu-driver><gpu-driver-version>|-gpu}][-inference]

Field Description Examples
framework Machine learning framework supported by the environment pytorch, sklearn, tensorflow
framework-version Framework version, major and minor values only 1.1, 11.1, 2.8
os Operating system, specified only when not Ubuntu. centos, debian, win
os-version Operating system version 9, 11, 2022
python-version Python version, major and minor values only, no period. Use only when absolutely required. 38 (for Python 3.8)
gpu-driver GPU driver cuda
gpu-driver-version GPU driver version, major and minor values only 11.6

image source

Notes

  • Environments are assumed to be based on Ubuntu unless -os<os-version> is included
  • For a GPU environment, use either -<gpu-driver><gpu-driver-version> or -gpu, not both
    • -gpu is only used when the GPU driver name and version aren't important
  • Environments without a GPU driver or -gpu suffix are CPU-only
  • Environments with an -inference suffix provide inferencing support
  • In general, use fewer fields in the name to minimize maintenance costs. Otherwise, you'll spend time deprecating environments that are locked to a specific OS or Python version that have reached end-of-life, or other situations where a required update would invalidate the environment's name.
  • If your environment isn't focused on a particular framework, choose a simple name and use the fields above as needed. Consider using a project-specific prefix to group multiple environments.

Examples

  • pytorch-1.9 (CPU version)
  • pytorch-1.9-cuda11.6
  • pytorch-1.9-gpu
  • pytorch-1.9-py38-gpu-inference
  • pytorch-1.9-win2022-py38
  • myproject-indexer

Docker image names

To keep them easy to maintain, Docker image names should match the name of their associated environment.

Examples:

Environment Name Docker Image Name
pytorch-1.9 azureml/curated/pytorch-1.9
pytorch-1.9-cuda11.6 azureml/curated/pytorch-1.9-cuda11.6
Clone this wiki locally