You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-use-environments.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ Environment(name="myenv")
49
49
50
50
### Use a curated environment
51
51
52
-
Curated environments contain collections of Python packages and are available in your workspace by default. These environments are backed by cached Docker images which reduces the job preparation cost. You can select one of these popular curated environments to start with:
52
+
Curated environments contain collections of Python packages and are available in your workspace by default. These environments are backed by cached Docker images which reduces the run preparation cost. You can select one of these popular curated environments to start with:
53
53
54
54
* The _AzureML-lightgbm-3.2-ubuntu18.04-py37-cpu_ environment contains Scikit-learn, LightGBM, XGBoost, Dask as well as other AzureML Python SDK and additional packages.
Azure Machine Learning builds a Docker image and creates a Python environment within that container, given your specifications. The Docker images are cached and reused: the first job in a new environment typically takes longer as the image is build. For local jobs, specify Docker within the [JobConfiguration](/python/api/azureml-core/azureml.core.runconfig.runconfiguration?view=azure-ml-py&preserve-view=true#variables).
106
+
Azure Machine Learning builds a Docker image and creates a Python environment within that container, given your specifications. The Docker images are cached and reused: the first run in a new environment typically takes longer as the image is build. For local runs, specify Docker within the [RunConfiguration](/python/api/azureml-core/azureml.core.runconfig.runconfiguration?view=azure-ml-py&preserve-view=true#variables).
107
107
108
108
By default, the newly built Docker image appears in the container registry that's associated with the workspace. The repository name has the form *azureml/azureml_\<uuid\>*. The unique identifier (*uuid*) part of the name corresponds to a hash that's computed from the environment configuration. This correspondence allows the service to determine whether an image for the given environment already exists for reuse.
> If you install some Python dependencies in your Docker image and forget to set `user_managed_dependencies=True`, those packages will not exist in the execution environment thus causing runtime failures. By default, Azure ML will build a Conda environment with dependencies you specified, and will execute the job in that environment instead of using any Python libraries that you installed on the base image.
174
+
> If you install some Python dependencies in your Docker image and forget to set `user_managed_dependencies=True`, those packages will not exist in the execution environment thus causing runtime failures. By default, Azure ML will build a Conda environment with dependencies you specified, and will execute the run in that environment instead of using any Python libraries that you installed on the base image.
175
175
176
176
#### Retrieve image details
177
177
@@ -181,15 +181,15 @@ For a registered environment, you can retrieve image details using the following
If you have an existing Conda environment on your local computer, then you can use the service to create an environment object. By using this strategy, you can reuse your local interactive environment on remote jobs.
192
+
If you have an existing Conda environment on your local computer, then you can use the service to create an environment object. By using this strategy, you can reuse your local interactive environment on remote runs.
193
193
194
194
The following code creates an environment object from the existing Conda environment `mycondaenv`. It uses the [`from_existing_conda_environment()`](/python/api/azureml-core/azureml.core.environment.environment#from-existing-conda-environment-name--conda-environment-name-) method.
If you don't specify an environment in your script job configuration before you submit the job, then a default environment is created for you.
212
+
If you don't specify an environment in your script run configuration before you submit the run, then a default environment is created for you.
213
213
214
214
```python
215
215
from azureml.core import ScriptRunConfig, Experiment, Environment
@@ -266,7 +266,7 @@ Manage environments so that you can update, track, and reuse them across compute
266
266
267
267
### Register environments
268
268
269
-
The environment is automatically registered with your workspace when you submit a job or deploy a web service. You can also manually register the environment by using the [`register()`](/python/api/azureml-core/azureml.core.environment%28class%29#register-workspace-) method. This operation makes the environment into an entity that's tracked and versioned in the cloud. The entity can be shared between workspace users.
269
+
The environment is automatically registered with your workspace when you submit a run or deploy a web service. You can also manually register the environment by using the [`register()`](/python/api/azureml-core/azureml.core.environment%28class%29#register-workspace-) method. This operation makes the environment into an entity that's tracked and versioned in the cloud. The entity can be shared between workspace users.
270
270
271
271
The following code registers the `myenv` environment to the `ws` workspace.
272
272
@@ -278,7 +278,7 @@ When you use the environment for the first time in training or deployment, it's
278
278
279
279
### Get existing environments
280
280
281
-
The `Environment` class offers methods that allow you to retrieve existing environments in your workspace. You can retrieve environments by name, as a list, or by a specific training job. This information is helpful for troubleshooting, auditing, and reproducibility.
281
+
The `Environment` class offers methods that allow you to retrieve existing environments in your workspace. You can retrieve environments by name, as a list, or by a specific training run. This information is helpful for troubleshooting, auditing, and reproducibility.
282
282
283
283
#### View a list of environments
284
284
@@ -292,9 +292,9 @@ You can also get a specific environment by name and version. The following code
To get the environment that was used for a specific job after the training finishes, use the [`get_environment()`](/python/api/azureml-core/azureml.core.run.run#get-environment--) method in the `Run` class.
297
+
To get the environment that was used for a specific run after the training finishes, use the [`get_environment()`](/python/api/azureml-core/azureml.core.run.run#get-environment--) method in the `Run` class.
298
298
299
299
```python
300
300
from azureml.core import Run
@@ -303,7 +303,7 @@ Run.get_environment()
303
303
304
304
### Update an existing environment
305
305
306
-
Say you change an existing environment, for example, by adding a Python package. This will take time to build as a new version of the environment is then created when you submit a job, deploy a model, or manually register the environment. The versioning allows you to view the environment's changes over time.
306
+
Say you change an existing environment, for example, by adding a Python package. This will take time to build as a new version of the environment is then created when you submit a run, deploy a model, or manually register the environment. The versioning allows you to view the environment's changes over time.
307
307
308
308
To update a Python package version in an existing environment, specify the version number for that package. If you don't use the exact version number, then Azure Machine Learning will reuse the existing environment with its original package versions.
309
309
@@ -332,11 +332,11 @@ It is no longer required for users to have admin mode enabled on their workspace
332
332
333
333
## Use environments for training
334
334
335
-
To submit a training job, you need to combine your environment, [compute target](concept-compute-target.md), and your training Python script into a job configuration. This configuration is a wrapper object that's used for submitting jobs.
335
+
To submit a training run, you need to combine your environment, [compute target](concept-compute-target.md), and your training Python script into a run configuration. This configuration is a wrapper object that's used for submitting runs.
336
336
337
-
When you submit a training job, the building of a new environment can take several minutes. The duration depends on the size of the required dependencies. The environments are cached by the service. So as long as the environment definition remains unchanged, you incur the full setup time only once.
337
+
When you submit a training run, the building of a new environment can take several minutes. The duration depends on the size of the required dependencies. The environments are cached by the service. So as long as the environment definition remains unchanged, you incur the full setup time only once.
338
338
339
-
The following local script job example shows where you would use [`ScriptRunConfig`](/python/api/azureml-core/azureml.core.script_run_config.scriptrunconfig) as your wrapper object.
339
+
The following local script run example shows where you would use [`ScriptRunConfig`](/python/api/azureml-core/azureml.core.script_run_config.scriptrunconfig) as your wrapper object.
340
340
341
341
```python
342
342
from azureml.core import ScriptRunConfig, Experiment
@@ -354,12 +354,12 @@ run = exp.submit(src)
354
354
```
355
355
356
356
> [!NOTE]
357
-
> To disable the job history or job snapshots, use the setting under `src.run_config.history`.
357
+
> To disable the run history or run snapshots, use the setting under `src.run_config.history`.
358
358
359
359
>[!IMPORTANT]
360
360
> Use CPU SKUs for any image build on compute.
361
361
362
-
If you don't specify the environment in your job configuration, then the service creates a default environment when you submit your job.
362
+
If you don't specify the environment in your run configuration, then the service creates a default environment when you submit your run.
363
363
364
364
## Use environments for web service deployment
365
365
@@ -370,7 +370,7 @@ If you are defining your own environment for web service deployment, you must li
370
370
371
371
To deploy a web service, combine the environment, inference compute, scoring script, and registered model in your deployment object, [`deploy()`](/python/api/azureml-core/azureml.core.model.model#deploy-workspace--name--models--inference-config-none--deployment-config-none--deployment-target-none--overwrite-false-). For more information, see [How and where to deploy models](how-to-deploy-and-where.md).
372
372
373
-
In this example, assume that you've completed a training job. Now you want to deploy that model to Azure Container Instances. When you build the web service, the model and scoring files are mounted on the image, and the Azure Machine Learning inference stack is added to the image.
373
+
In this example, assume that you've completed a training run. Now you want to deploy that model to Azure Container Instances. When you build the web service, the model and scoring files are mounted on the image, and the Azure Machine Learning inference stack is added to the image.
374
374
375
375
```python
376
376
from azureml.core.model import InferenceConfig, Model
0 commit comments