Skip to content

Commit 38f544a

Browse files
Merge pull request #2082 from sdgilley/sdg-tutorial-update
sync with notebook
2 parents 6a703d8 + 969bd05 commit 38f544a

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

articles/machine-learning/tutorial-azure-ml-in-a-day.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.topic: quickstart
99
author: sdgilley
1010
ms.author: sgilley
1111
ms.reviewer: sgilley
12-
ms.date: 09/03/2024
12+
ms.date: 12/19/2024
1313
ms.custom:
1414
- sdkv2
1515
- build-2023
@@ -205,10 +205,32 @@ def main():
205205
##########################
206206
# Registering the model to the workspace
207207
print("Registering the model via MLFlow")
208+
209+
# pin numpy
210+
conda_env = {
211+
'name': 'mlflow-env',
212+
'channels': ['conda-forge'],
213+
'dependencies': [
214+
'python=3.10.15',
215+
'pip<=21.3.1',
216+
{
217+
'pip': [
218+
'mlflow==2.17.0',
219+
'cloudpickle==2.2.1',
220+
'pandas==1.5.3',
221+
'psutil==5.8.0',
222+
'scikit-learn==1.5.2',
223+
'numpy==1.26.4',
224+
]
225+
}
226+
],
227+
}
228+
208229
mlflow.sklearn.log_model(
209230
sk_model=clf,
210231
registered_model_name=args.registered_model_name,
211232
artifact_path=args.registered_model_name,
233+
conda_env=conda_env,
212234
)
213235

214236
# Saving the model to a file
@@ -231,6 +253,7 @@ As you can see in this script, once the model is trained, the model file is save
231253

232254
You might need to select **Refresh** to see the new folder and script in your **Files**.
233255

256+
234257
:::image type="content" source="media/tutorial-azure-ml-in-a-day/refresh.png" alt-text="Screenshot shows the refresh icon.":::
235258

236259
## Configure the command

0 commit comments

Comments
 (0)