Skip to content

Commit 4bd5062

Browse files
committed
Fix: pin mlflow<2.19 and replace conda_env with pip_requirements to avoid image build failure
The sklearn-1.5 curated environment updated conda which deprecated conda info --root. This broke the custom conda_env-based Docker image build during deployment. Replacing conda_env with pip_requirements keeps the same pinned package versions while using pip-based deployment that avoids the broken conda Dockerfile template.
2 parents f6e3558 + 32983f5 commit 4bd5062

1 file changed

Lines changed: 11 additions & 21 deletions

File tree

tutorials/get-started-notebooks/quickstart.ipynb

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -255,31 +255,21 @@
255255
" # Registering the model to the workspace\n",
256256
" print(\"Registering the model via MLFlow\")\n",
257257
"\n",
258-
" # pin numpy\n",
259-
" conda_env = {\n",
260-
" 'name': 'mlflow-env',\n",
261-
" 'channels': ['conda-forge'],\n",
262-
" 'dependencies': [\n",
263-
" 'python=3.10.15',\n",
264-
" 'pip<=21.3.1',\n",
265-
" {\n",
266-
" 'pip': [\n",
267-
" 'mlflow==2.17.0',\n",
268-
" 'cloudpickle==2.2.1',\n",
269-
" 'pandas==1.5.3',\n",
270-
" 'psutil==5.8.0',\n",
271-
" 'scikit-learn==1.5.2',\n",
272-
" 'numpy==1.26.4',\n",
273-
" ]\n",
274-
" }\n",
275-
" ],\n",
276-
" }\n",
258+
" # pin package versions for deployment environment\n",
259+
" pip_requirements = [\n",
260+
" 'mlflow==2.17.0',\n",
261+
" 'cloudpickle==2.2.1',\n",
262+
" 'pandas==1.5.3',\n",
263+
" 'psutil==5.8.0',\n",
264+
" 'scikit-learn==1.5.2',\n",
265+
" 'numpy==1.26.4',\n",
266+
" ]\n",
277267
"\n",
278268
" mlflow.sklearn.log_model(\n",
279269
" sk_model=clf,\n",
280270
" registered_model_name=args.registered_model_name,\n",
281271
" artifact_path=args.registered_model_name,\n",
282-
" conda_env=conda_env,\n",
272+
" pip_requirements=pip_requirements,\n",
283273
" )\n",
284274
"\n",
285275
" # Saving the model to a file\n",
@@ -721,4 +711,4 @@
721711
},
722712
"nbformat": 4,
723713
"nbformat_minor": 2
724-
}
714+
}

0 commit comments

Comments
 (0)