Skip to content

Commit 76cc751

Browse files
Merge pull request #622 from sdgilley/sdg-freshness
Freshness + UUF - serverless compute
2 parents 76027b6 + 8818ea2 commit 76cc751

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

articles/machine-learning/how-to-use-serverless-compute.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ ms.custom:
1111
ms.topic: how-to
1212
ms.author: sgilley
1313
author: sdgilley
14-
ms.reviewer: vijetaj
15-
ms.date: 10/23/2023
14+
ms.reviewer: bijuv
15+
ms.date: 10/02/2024
1616
---
1717

1818
# Model training on serverless compute
@@ -102,7 +102,7 @@ When you [view your usage and quota in the Azure portal](how-to-manage-quotas.md
102102
)
103103
job = command(
104104
command="echo 'hello world'",
105-
environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest",
105+
environment="azureml://registries/azureml/environments/sklearn-1.5/labels/latest",
106106
identity=UserIdentityConfiguration(),
107107
)
108108
# submit the command job
@@ -111,15 +111,25 @@ When you [view your usage and quota in the Azure portal](how-to-manage-quotas.md
111111

112112
# [Azure CLI](#tab/cli)
113113

114+
Create a file named hello.yaml with the following content:
115+
114116
```yml
115117
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
116118
command: echo "hello world"
117119
environment:
118-
image: azureml:AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest
120+
image: library/python:latest
119121
identity:
120122
type: user_identity
121123
```
122124

125+
Submit the job with the following command:
126+
127+
```bash
128+
az ml job create --file hello.yaml --resource-group my-resource-group --workspace-name my-workspace
129+
```
130+
131+
The rest of the CLI examples show variations of the hello.yaml file. Run each of them in the same way.
132+
123133
---
124134

125135
* **User-assigned managed identity** : When you have a workspace configured with [user-assigned managed identity](how-to-identity-based-service-authentication.md#workspace), you can use that identity with the serverless job for storage access. To access secrets, see [Use authentication credential secrets in Azure Machine Learning jobs](how-to-use-secrets-in-runs.md).
@@ -143,7 +153,7 @@ When you [view your usage and quota in the Azure portal](how-to-manage-quotas.md
143153
)
144154
job = command(
145155
command="echo 'hello world'",
146-
environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest",
156+
environment="azureml://registries/azureml/environments/sklearn-1.5/labels/latest",
147157
identity= ManagedIdentityConfiguration(),
148158
)
149159
# submit the command job
@@ -157,7 +167,7 @@ When you [view your usage and quota in the Azure portal](how-to-manage-quotas.md
157167
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
158168
command: echo "hello world"
159169
environment:
160-
image: azureml:AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest
170+
image: library/python:latest
161171
identity:
162172
type: managed
163173
````
@@ -189,7 +199,7 @@ ml_client = MLClient(
189199
)
190200
job = command(
191201
command="echo 'hello world'",
192-
environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest",
202+
environment="azureml://registries/azureml/environments/sklearn-1.5/labels/latest",
193203
)
194204
# submit the command job
195205
ml_client.create_or_update(job)
@@ -235,7 +245,7 @@ You can override these defaults. If you want to specify the VM type or number o
235245
)
236246
job = command(
237247
command="echo 'hello world'",
238-
environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest",
248+
environment="azureml://registries/azureml/environments/sklearn-1.5/labels/latest",
239249
resources = JobResourceConfiguration(instance_type="Standard_NC24", instance_count=4)
240250
)
241251
# submit the command job
@@ -274,7 +284,7 @@ You can override these defaults. If you want to specify the VM type or number o
274284
)
275285
job = command(
276286
command="echo 'hello world'",
277-
environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest",
287+
environment="azureml://registries/azureml/environments/sklearn-1.5/labels/latest",
278288
queue_settings={
279289
"job_tier": "spot"
280290
}
@@ -315,7 +325,7 @@ ml_client = MLClient(
315325
)
316326
job = command(
317327
command="echo 'hello world'",
318-
environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest",
328+
environment="azureml://registries/azureml/environments/sklearn-1.5/labels/latest",
319329
identity=UserIdentityConfiguration(),
320330
queue_settings={
321331
"job_tier": "Standard"
@@ -331,7 +341,7 @@ ml_client.create_or_update(job)
331341
$schema: https://azuremlschemas.azureedge.net/latest/commandJob.schema.json
332342
command: echo "hello world"
333343
environment:
334-
image: azureml:AzureML-sklearn-1.0-ubuntu20.04-py38-cpu@latest
344+
image: library/python:latest
335345
queue_settings:
336346
job_tier: Standard #Possible Values are Standard, Spot. Default is Standard.
337347
identity:

0 commit comments

Comments
 (0)