Skip to content

Commit 71f25a0

Browse files
committed
Address some feedback from bug bash
1 parent b90b335 commit 71f25a0

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

articles/machine-learning/tutorial-1st-experiment-bring-data.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ if __name__ == "__main__":
188188
resource_group = "<RESOURCE_GROUP>"
189189
workspace = "<AML_WORKSPACE_NAME>"
190190

191-
# Client class to interact with Azure ML services and resources, e.g. workspaces, jobs, models and so on.
191+
# client class to interact with Azure ML services and resources, e.g. workspaces, jobs, models and so on.
192192
ml_client = MLClient(
193193
default_azure_credential,
194194
subscription_id,
@@ -207,24 +207,26 @@ if __name__ == "__main__":
207207
)
208208
ml_client.environments.create_or_update(env_docker_image)
209209

210+
# target name of compute where job will be executed
211+
computeName="cpu-cluster"
210212
job = command(
211213
code="./src",
212214
# the parameter will match the training script argument name
213215
# inputs.data_path key should match the dictionary key
214216
command="python train.py --data_path ${{inputs.data_path}}",
215217
inputs=my_job_inputs,
216218
environment=f"{env_name}@latest",
217-
compute="cpu-cluster",
219+
compute=computeName,
218220
display_name="day1-experiment-data",
219221
)
220222

221223
returned_job = ml_client.create_or_update(job)
222224
aml_url = returned_job.studio_url
223-
print(aml_url)
225+
print("Monitor your job at", aml_url)
224226
```
225227

226228
> [!TIP]
227-
> If you used a different name when you created your compute cluster, make sure to adjust the name in the code `compute_target='cpu-cluster'` as well.
229+
> If you used a different name when you created your compute cluster, make sure to adjust the name in the code `computeName='cpu-cluster'` as well.
228230
229231
### Understand the code changes
230232

articles/machine-learning/tutorial-1st-experiment-hello-world.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,23 @@ ml_client = MLClient(
103103
resource_group,
104104
workspace)
105105

106+
# target name of compute where job will be executed
107+
computeName="cpu-cluster"
106108
job = command(
107109
code="./src",
108110
command="python hello.py",
109111
environment="AzureML-sklearn-0.24-ubuntu18.04-py37-cpu@latest",
110-
compute="cpu-cluster",
112+
compute=computeName,
111113
display_name="hello-world-example",
112114
)
113115

114116
returned_job = ml_client.create_or_update(job)
115117
aml_url = returned_job.studio_url
116-
print(aml_url)
118+
print("Monitor your job at", aml_url)
117119
```
118120

119121
> [!TIP]
120-
> If you used a different name when you created your compute cluster, make sure to adjust the name in the code `compute_target='cpu-cluster'` as well.
122+
> If you used a different name when you created your compute cluster, make sure to adjust the name in the code `computeName='cpu-cluster'` as well.
121123
122124
### Understand the code
123125

articles/machine-learning/tutorial-1st-experiment-sdk-train.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,22 +200,23 @@ if __name__ == "__main__":
200200
)
201201
ml_client.environments.create_or_update(env_docker_image)
202202

203+
# target name of compute where job will be executed
204+
computeName="cpu-cluster"
203205
job = command(
204206
code="./src",
205207
command="python train.py",
206208
environment=f"{env_name}@latest",
207-
compute="cpu-cluster",
209+
compute=computeName,
208210
display_name="day1-experiment-train",
209211
)
210212

211213
returned_job = ml_client.create_or_update(job)
212214
aml_url = returned_job.studio_url
213-
print(aml_url)
214-
215+
print("Monitor your job at", aml_url)
215216
```
216217

217218
> [!TIP]
218-
> If you used a different name when you created your compute cluster, make sure to adjust the name in the code `compute_target='cpu-cluster'` as well.
219+
> If you used a different name when you created your compute cluster, make sure to adjust the name in the code `computeName='cpu-cluster'` as well.
219220
220221
### Understand the code changes
221222

@@ -229,7 +230,7 @@ if __name__ == "__main__":
229230
:::row-end:::
230231
:::row:::
231232
:::column span="":::
232-
environment=f"{env_name}@latest",
233+
`environment=f"{env_name}@latest"`
233234
:::column-end:::
234235
:::column span="2":::
235236
Adds the environment to [command](/python/api/azure-ai-ml/azure.ai.ml#azure-ai-ml-command).

0 commit comments

Comments
 (0)