Skip to content

Commit 3e3431b

Browse files
author
Trevor Bye
committed
adding cli env json schema
1 parent 8b99911 commit 3e3431b

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

articles/machine-learning/reference-azure-machine-learning-cli.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,65 @@ The following commands demonstrate how to create, register, and list Azure Machi
259259
260260
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).
261261
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.
265+
266+
```json
267+
{
268+
"name": "testenv",
269+
"version": null,
270+
"environmentVariables": {
271+
"EXAMPLE_ENV_VAR": "EXAMPLE_VALUE"
272+
},
273+
"python": {
274+
"userManagedDependencies": false,
275+
"interpreterPath": "python",
276+
"condaDependenciesFile": null,
277+
"baseCondaEnvironment": null
278+
},
279+
"docker": {
280+
"enabled": false,
281+
"baseImage": "mcr.microsoft.com/azureml/base:intelmpi2018.3-ubuntu16.04",
282+
"baseDockerfile": null,
283+
"sharedVolumes": true,
284+
"shmSize": "2g",
285+
"arguments": [],
286+
"baseImageRegistry": {
287+
"address": null,
288+
"username": null,
289+
"password": null
290+
}
291+
},
292+
"spark": {
293+
"repositories": [],
294+
"packages": [],
295+
"precachePackages": true
296+
},
297+
"databricks": {
298+
"mavenLibraries": [],
299+
"pypiLibraries": [],
300+
"rcranLibraries": [],
301+
"jarLibraries": [],
302+
"eggLibraries": []
303+
},
304+
"inferencingStackVersion": null
305+
}
306+
```
307+
308+
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. 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. |
318+
| `databricks` | [`DatabricksSection`](https://docs.microsoft.com/python/api/azureml-core/azureml.core.databricks.databrickssection?view=azure-ml-py) | Configures Databricks library dependencies. |
319+
| `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+
262321
## ML pipeline management
263322

264323
The following commands demonstrate how to work with machine learning pipelines:

0 commit comments

Comments
 (0)