Skip to content

Commit 8383a36

Browse files
authored
Merge pull request #103768 from Muhtasham/patch-3
Update how-to-convert-custom-model-to-mlflow.md
2 parents 34cc7c2 + eb69702 commit 8383a36

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

articles/machine-learning/how-to-convert-custom-model-to-mlflow.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,8 @@ The following code demonstrates how to create a Python wrapper for an `sklearn`
4141
# Load training and test datasets
4242
from sys import version_info
4343
import sklearn
44-
from sklearn import datasets
45-
from sklearn.model_selection import train_test_split
46-
4744
import mlflow.pyfunc
48-
from sklearn.metrics import mean_squared_error
49-
from sklearn.model_selection import train_test_split
45+
5046

5147
PYTHON_VERSION = "{major}.{minor}.{micro}".format(major=version_info.major,
5248
minor=version_info.minor,
@@ -99,7 +95,7 @@ conda_env = {
9995
Once your environment is ready, you can pass the SKlearnWrapper, the Conda environment, and your newly created artifacts dictionary to the mlflow.pyfunc.save_model() method. Doing so saves the model to your disk.
10096

10197
```python
102-
mlflow_pyfunc_model_path = "sklearn_mlflow_pyfunc7"
98+
mlflow_pyfunc_model_path = "sklearn_mlflow_pyfunc_custom"
10399
mlflow.pyfunc.save_model(path=mlflow_pyfunc_model_path, python_model=SKLearnWrapper(), conda_env=conda_env, artifacts=artifacts)
104100

105101
```

0 commit comments

Comments
 (0)