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/how-to-use-automlstep-in-pipelines.md
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -409,22 +409,20 @@ The code above combines the data preparation, automated ML, and model-registerin
409
409
410
410
### Examine pipeline results
411
411
412
-
Once the `run` completes, you can retrieve `PipelineData` objects that have been assigned a `pipeline_output_name`.
412
+
Once the `run` completes, you can retrieve `PipelineData` objects that have been assigned a `pipeline_output_name`. You can download the results and load them for further processing.
Downloaded files are written to the sub-directory `azureml/{run.id}/`. The metrics file is JSON-formatted and can be converted into a Pandas dataframe for examination.
427
423
424
+
For local processing, you may need to install relevant packages, such as Pandas, Pickle, the AzureML SDK, and so forth.
The code snippet above shows the metrics file being loaded from it's location on the Azure datastore. You can also load it from the downloaded file, as shown in the comment. Once you've deserialized it and converted it to a Pandas DataFrame, you can see detailed metrics for each of the iterations of the automated ML step.
442
440
443
-
The model file can be deserialized into a `Model` object that you can use for inferencing, further metrics analysis, and so forth. To load a `Model` locally, you'll need to have installed the Azure ML SDK. For more information on loading and working with existing models, see [Use an existing model with Azure Machine Learning](how-to-deploy-existing-model.md).
441
+
The model file can be deserialized into a `Model` object that you can use for inferencing, further metrics analysis, and so forth.
442
+
443
+
```python
444
+
import pickle
445
+
446
+
model_filename = model_output._path_on_datastore
447
+
# model_filename = path to downloaded file
448
+
449
+
withopen(model_filename, "rb" ) as f:
450
+
best_model = pickle.load(f)
451
+
452
+
# ... inferencing code not shown ...
453
+
```
454
+
455
+
For more information on loading and working with existing models, see [Use an existing model with Azure Machine Learning](how-to-deploy-existing-model.md).
444
456
445
-
### Download the results of an automated ML run
457
+
### Download the results of an automated ML run
446
458
447
459
If you've been following along with the article, you'll have an instantiated `run` object. But you can also retrieve completed `Run` objects from the `Workspace` by way of an `Experiment` object.
0 commit comments