Skip to content

Commit 3823872

Browse files
Merge pull request #227882 from Naveenommi-MSFT/patch-24
(AzureCXP) fixes MicrosoftDocs/azure-docs#105400
2 parents 4c38089 + 955e795 commit 3823872

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

articles/machine-learning/how-to-inference-onnx-automl-image-models.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The following code returns the best child run based on the relevant primary metr
6969
```python
7070
from azure.identity import DefaultAzureCredential
7171
from azure.ai.ml import MLClient
72+
mlflow_client = MlflowClient()
7273

7374
credential = DefaultAzureCredential()
7475
ml_client = None
@@ -136,7 +137,7 @@ Download the conda environment file and create an environment object to be used
136137

137138
conda_file = mlflow_client.download_artifacts(
138139
best_run.info.run_id, "outputs/conda_env_v_1_0_0.yml", local_dir
139-
140+
)
140141
from azure.ai.ml.entities import Environment
141142
env = Environment(
142143
name="automl-images-env-onnx",
@@ -278,7 +279,7 @@ returned_job_run = mlflow_client.get_run(returned_job.name)
278279

279280
# Download run's artifacts/outputs
280281
onnx_model_path = mlflow_client.download_artifacts(
281-
best_run.info.run_id, 'outputs/model_'+str(batch_size)+'.onnx', local_dir
282+
returned_job_run.info.run_id, 'outputs/model_'+str(batch_size)+'.onnx', local_dir
282283
)
283284
```
284285

0 commit comments

Comments
 (0)