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/concept-environments.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ Environments can be created by:
39
39
* Defining new `Environment` objects, either using a curated environment or by defining your own dependencies
40
40
* Using existing `Environment` objects from your workspace. This allows for consistency and reproducibility with your dependencies
41
41
* Importing from an existing Anaconda environment definition.
42
+
* Using the Azure Machine Learning CLI
42
43
43
44
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:
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-use-environments.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -344,6 +344,34 @@ service = Model.deploy(
344
344
345
345
This [example notebook](https://github.com/Azure/MachineLearningNotebooks/tree/master/how-to-use-azureml/training/using-environments) expands upon concepts and methods demonstrated in this article.
346
346
347
+
## Create and manage environments with the CLI
348
+
349
+
The [Azure Machine Learning CLI](reference-azure-machine-learning-cli.md) mirrors the majority of the functionality of the Python SDK, and can be used for environment creation and management. The following commands demonstrate basic functionality.
350
+
351
+
The following command scaffolds the files for a default environment definition in the specified directory. These files are JSON files that are similar in function to the corresponding class in the SDK, and can be used to create new environments with custom settings.
352
+
353
+
```azurecli-interactive
354
+
az ml environment scaffold -n myenv -d myenvdir
355
+
```
356
+
357
+
Run the following command to register an environment from a specified directory.
358
+
359
+
```azurecli-interactive
360
+
az ml environment register -d myenvdir
361
+
```
362
+
363
+
Running the following command will list all registered environments.
364
+
365
+
```azurecli-interactive
366
+
az ml environment list
367
+
```
368
+
369
+
Download a registered environment with the following command.
370
+
371
+
```azurecli-interactive
372
+
az ml environment download -n myenv -d downloaddir
373
+
```
374
+
347
375
## Next steps
348
376
349
377
*[Tutorial: Train a model](tutorial-train-models-with-aml.md) uses a managed compute target to train a model.
Copy file name to clipboardExpand all lines: articles/machine-learning/reference-azure-machine-learning-cli.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -259,6 +259,65 @@ The following commands demonstrate how to create, register, and list Azure Machi
259
259
260
260
For more information, see [az ml environment download](https://docs.microsoft.com/cli/azure/ext/azure-cli-ml/ml/environment?view=azure-cli-latest#ext-azure-cli-ml-az-ml-environment-download).
261
261
262
+
### Environment configuration schema
263
+
264
+
If you used the `az ml environment scaffold` command, it generates a template `azureml_environment.json` file that can be modified and used to create custom environment configurations with the CLI. The top level object loosely maps to the [`Environment`](https://docs.microsoft.com/python/api/azureml-core/azureml.core.environment(class)?view=azure-ml-py) class in the Python SDK.
The following table details each top-level field in the JSON file, it's type, and a description. If an object type is linked to a class from the Python SDK, there is a loose 1:1 match between each JSON field and the public variable name in the Python class. In some cases the field may map to a constructor argument rather than a class variable. For example, the `environmentVariables` field maps to the `environment_variables` variable in the [`Environment`](https://docs.microsoft.com/python/api/azureml-core/azureml.core.environment(class)?view=azure-ml-py) class.
309
+
310
+
| JSON field | Type | Description |
311
+
|---|---|---|
312
+
|`name`|`string`| Name of the environment. Do not start name with **Microsoft** or **AzureML**. |
313
+
|`version`|`string`| Version of the environment. |
314
+
|`environmentVariables`|`{string: string}`| A hash-map of environment variable names and values. |
315
+
|`python`|[`PythonSection`](https://docs.microsoft.com/python/api/azureml-core/azureml.core.environment.pythonsection?view=azure-ml-py)| Object that defines the Python environment and interpreter to use on target compute resource. |
316
+
|`docker`|[`DockerSection`](https://docs.microsoft.com/python/api/azureml-core/azureml.core.environment.dockersection?view=azure-ml-py)| Defines settings to customize the Docker image built to the environment's specifications. |
317
+
|`spark`|[`SparkSection`](https://docs.microsoft.com/python/api/azureml-core/azureml.core.environment.sparksection?view=azure-ml-py)| The section configures Spark settings. It is only used when framework is set to PySpark. |
|`inferencingStackVersion`|`string`| Specifies the inferencing stack version added to the image. To avoid adding an inferencing stack, leave this field `null`. Valid value: "latest". |
320
+
262
321
## ML pipeline management
263
322
264
323
The following commands demonstrate how to work with machine learning pipelines:
0 commit comments