Skip to content

Commit c281746

Browse files
authored
Merge pull request #57219 from heatherbshapiro/patch-11
updated code for new sdk version
2 parents 6162d38 + a4f8a1e commit c281746

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/machine-learning/service/how-to-track-experiments.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ms.date: 09/24/2018
1717
In the Azure Machine Learning service, you can track your experiments and monitor metrics to enhance the model creation process. In this article, you'll learn about the different ways to add logging to your training script, how to submit the experiment with **start_logging** and **ScriptRunConfig**, how to check the progress of a running job, and how to view the results of a run.
1818

1919
>[!NOTE]
20-
> Code in this article was tested with Azure Machine Learning SDK version 0.168
20+
> Code in this article was tested with Azure Machine Learning SDK version 0.1.74
2121
2222
## List of training metrics
2323

@@ -63,7 +63,6 @@ Before adding logging and submitting an experiment, you must set up the workspac
6363

6464
# make up an arbitrary name
6565
experiment_name = 'train-in-notebook'
66-
exp = Experiment(workspace_object = ws, name = experiment_name)
6766
```
6867

6968
## Option 1: Use start_logging
@@ -99,7 +98,8 @@ The following example trains a simple sklearn Ridge model locally in a local Jup
9998
2. Add experiment tracking using the Azure Machine Learning service SDK, and upload a persisted model into the experiment run record. The following code adds tags, logs, and uploads a model file to the experiment run.
10099

101100
```python
102-
run = Run.start_logging(experiment = exp)
101+
experiment = Experiment(workspace = ws, name = experiment_name)
102+
run = experiment.start_logging()
103103
run.tag("Description","My first run!")
104104
run.log('alpha', 0.03)
105105
reg = Ridge(alpha = 0.03)
@@ -205,8 +205,8 @@ This example expands on the basic sklearn Ridge model from above. It does a simp
205205
```python
206206
from azureml.core import ScriptRunConfig
207207

208-
src = ScriptRunConfig(source_directory = script_folder, script = 'train.py', run_config = run_config_user_managed)
209-
run = exp.submit(src)
208+
src = ScriptRunConfig(source_directory = './', script = 'train.py', run_config = run_config_user_managed)
209+
run = experiment.submit(src)
210210
```
211211

212212
## View run details

0 commit comments

Comments
 (0)