Internship appplication task
Position: ML Open Source Engineer Internship - skops: Hugging Face and scikit-learn
Task requirments
- Create a python environment and install
scikit-learn
version1.0
in that environment. - Using that environment, create a
LogisticRegression
model and fit it on the Iris dataset. - Save the trained model using
pickle
orjoblib
. - Create a second environment, and install
scikit-learn
version1.1
in it. - Try loading the model you saved in step 3 in this second environment.
Steps Taken
- I used mamba to create the environment locally.
- Trained a simple logistic regression model in
model.ipynb
. - Used pickle to save the model in
finalized_model.sav
. - Created another environment with
scikit-learn
version1.1
. - Imported the model in
importingmodel.ipynb
.
Observations
A warning is shown when trying to load the model.
/home/tarek/.local/lib/python3.8/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator LogisticRegression from version 1.0.2 when using version 1.1.0. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
warnings.warn(