A7 - environments
environment
- defines the software configuration used for jobs and deployments
- environments can be versioned
- there are two useful categories:
- curated
- custom
curated environment
- a prebuilt environment maintained/provided for common ML workloads
- advantages:
- less setup
- common frameworks already configured
- faster to get started
- often optimized for Azure ML scenarios
custom environment
- defined by the user by specifying base image, Conda/Python dependencies, and possibly Docker build configuration
- Conda is a common environment specification
name: training-env
dependencies:
- python=3.11
- pip
- pip:
- numpy
- pandas
- scikit-learn
- mlflow
- Conda dependencies can be one layer within the overall runtime environment
CONTAINER IMAGE
├── Linux
├── system libraries
├── maybe CUDA
└── Conda/Python environment
├── Python
├── numpy
├── sklearn
└── MLflow
-
one can also use their own Docker image, or the environment based on the container image
-
this gives maximum control, but also requires more maintenance and responsibility
-
environment categories have a trade-off between convenience and control
-
pinning versions for dependencies is also needed for stronger reproducibility
-
building environments are costly and time consuming, so avoid changing definitions every run
-
for GPU compute, GPU-enabled software is needed
-
curated environments reduce the burden of configuring each of this