Skip to content

Commit 6ee231d

Browse files
authored
Merge pull request #100197 from trevorbye/master
new environments concept article
2 parents b8caff7 + 0354485 commit 6ee231d

File tree

4 files changed

+60
-21
lines changed

4 files changed

+60
-21
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: 'What are ML Environments'
3+
titleSuffix: Azure Machine Learning
4+
description: In this article, learn the advantages of machine learning environments, that enable reproducible, auditable, and portable machine learning dependency definitions across different compute targets.
5+
services: machine-learning
6+
ms.service: machine-learning
7+
ms.subservice: core
8+
ms.topic: conceptual
9+
ms.author: trbye
10+
author: trevorbye
11+
ms.date: 01/06/2020
12+
---
13+
14+
# What are Azure Machine Learning environments?
15+
[!INCLUDE [applies-to-skus](../../includes/aml-applies-to-basic-enterprise-sku.md)]
16+
17+
Environments specify the Python packages, environment variables, and software settings around your training and scoring scripts, and run times (Python, Spark, or Docker). They are managed and versioned entities within your Azure Machine Learning workspace that enable reproducible, auditable, and portable machine learning workflows across different compute targets.
18+
19+
You can use an environment object on your local compute to develop your training script, reuse that same environment on Azure Machine Learning Compute for model training at scale, and even deploy your model with that same environment.
20+
21+
The following illustrates that the same environment object can be used in both your run configuration for training and in your inference and deployment configuration for web service deployments.
22+
23+
![Diagram of environment in machine learning workflow](./media/concept-environments/ml-environment.png)
24+
25+
## Types of environments
26+
27+
Environments can broadly be divided into three categories: **curated**, **user-managed** and **system-managed**.
28+
29+
Curated environments are provided by Azure Machine Learning and are available in your workspace by default. They contain collections of Python packages and settings to help you get started different machine learning frameworks.
30+
31+
For a user-managed environment, you're responsible for setting up your environment and installing every package your training script needs on the compute target. Conda will not check your environment or install anything for you. Please note that if you are defining your own environment, you must list `azureml-defaults` with version `>= 1.0.45` as a pip dependency. This package contains the functionality needed to host the model as a web service.
32+
33+
System-managed environments are used when you want [Conda](https://conda.io/docs/) to manage the Python environment and the script dependencies for you. The service assumes this type of environment by default, due to its usefulness on remote compute targets that are not manually configurable.
34+
35+
## Creating and managing environments
36+
37+
Environments can be created by:
38+
39+
* Defining new `Environment` objects, either using a curated environment or by defining your own dependencies
40+
* Using existing `Environment` objects from your workspace. This allows for consistency and reproducibility with your dependencies
41+
* Importing from an existing Anaconda environment definition.
42+
43+
See the [how-to](how-to-use-environments.md#create-an-environment) for specific code examples. Environments are also easily managed through your workspace and include the following functionality:
44+
45+
* Environments are automatically registered to your workspace when you submit an experiment. They can also be manually registered
46+
* Fetch environments from your workspace, and use them for training, deployment, or make edits to the environment definition
47+
* Versioning allows you to see changes to your environments over time, and ensures reproducibility
48+
* Build Docker images automatically from your environments
49+
50+
See the [manage environments](how-to-use-environments.md#manage-environments) section of the how-to for code samples.
51+
52+
## Next steps
53+
54+
* Learn how-to [create and use environments](how-to-use-environments.md) in Azure Machine Learning
55+
* See the Python SDK reference docs for the [environment class](https://docs.microsoft.com/python/api/azureml-core/azureml.core.environment(class)?view=azure-ml-py).
56+
* See the R SDK reference docs for [environments](https://azure.github.io/azureml-sdk-for-r/reference/index.html#section-environments).

articles/machine-learning/how-to-use-environments.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.reviewer: nibaccam
99
ms.service: machine-learning
1010
ms.subservice: core
1111
ms.topic: conceptual
12-
ms.date: 09/27/2019
12+
ms.date: 01/06/2020
1313

1414
## As a developer, I need to configure my experiment context with the necessary software packages so my machine learning models can be trained and deployed on different compute targets.
1515

@@ -29,32 +29,13 @@ The examples in this article show how to:
2929
* Use environment for training
3030
* Use environment for web service deployment
3131

32-
## What are environments
33-
34-
Environments specify the Python packages, environment variables, and software settings around your training and scoring scripts, and run times (Python, Spark, or Docker). They are managed and versioned entities within your Azure Machine Learning workspace that enable reproducible, auditable, and portable machine learning workflows across different compute targets.
35-
36-
You can use an environment object on your local compute to develop your training script, reuse that same environment on Azure Machine Learning Compute for model training at scale, and even deploy your model with that same environment.
37-
38-
The following illustrates that the same environment object can be used in both your run configuration for training and in your inference and deployment configuration for web service deployments.
39-
40-
![Diagram of environment in machine learning workflow](./media/how-to-use-environments/ml-environment.png)
41-
42-
### Types of environments
43-
44-
Environments can broadly be divided into three categories: **curated**, **user-managed** and **system-managed**.
45-
46-
Curated environments are provided by Azure Machine Learning and are available in your workspace by default. They contain collections of Python packages and settings to help you get started different machine learning frameworks.
47-
48-
For a user-managed environment, you're responsible for setting up your environment and installing every package your training script needs on the compute target. Conda will not check your environment or install anything for you. Please note that if you are defining your own environment, you must list azureml-defaults with version >= 1.0.45 as a pip dependency. This package contains the functionality needed to host the model as a web service.
49-
50-
System-managed environments are used when you want [Conda](https://conda.io/docs/) to manage the Python environment and the script dependencies for you. The service assumes this type of environment by default, due to its usefulness on remote compute targets that are not manually configurable.
32+
See the [conceptual article](concept-environments.md) for a high-level overview of how environments work in Azure Machine Learning.
5133

5234
## Prerequisites
5335

5436
* The Azure Machine Learning SDK for Python [installed](https://docs.microsoft.com/python/api/overview/azure/ml/install?view=azure-ml-py).
5537
* An [Azure Machine Learning workspace](how-to-manage-workspace.md).
5638

57-
5839
## Create an environment
5940

6041
There are multiple ways to create an environment for your experiments.
6.51 KB
Loading

articles/machine-learning/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
items:
7373
- name: Workspace
7474
href: concept-workspace.md
75+
- name: Environments
76+
href: concept-environments.md
7577
- name: Data
7678
href: concept-data.md
7779
- name: Model training

0 commit comments

Comments
 (0)