-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
pycaret version checks
-
I have checked that this issue has not already been reported here.
-
I have confirmed this bug exists on the latest version of pycaret.
-
I have confirmed this bug exists on the master branch of pycaret (pip install -U git+https://github.com/pycaret/pycaret.git@master).
Issue Description
Calling finalize_model() with logging turned on logs a model.pkl that predicts completely random values (dummy?)
Reproducible Example
from pycaret.regression import RegressionExperiment
from pycaret.datasets import get_data
data = get_data('ice_cream')
exp = RegressionExperiment()
exp.setup(data, target="Revenue", log_experiment=True, experiment_name="test")
model = exp.compare_models()
model = exp.create_model(model)
model = exp.tune_model(model)
# up until this point model.pkl files are correct on mlflow
model = exp.finalize_model(model)
# wrong .pkl gets logged
# downloading .pkl from mlflow and predicting gives random looking values
exp.save_model(model)
# correct model.pkl gets saved on disk
Expected Behavior
finalize_model() logs the correct model.pkl file
Actual Results
Temperature Revenue prediction_label
0 19.024611 517.534058 36.612213
1 8.790953 237.763916 10.010834
2 18.233229 418.137268 34.555084
3 35.628925 809.463440 79.773499
4 22.284550 550.278503 45.086090
5 16.302555 381.564148 29.536499
6 12.688430 276.787079 20.141968
7 16.020975 372.990601 28.804535
8 23.761436 553.445312 48.925140
Installed Versions
PyCaret optional dependencies:
shap: 0.41.0
interpret: 0.3.2
umap: Not installed
pandas_profiling: Not installed
explainerdashboard: Not installed
autoviz: Not installed
fairlearn: 0.8.0
xgboost: 1.7.5
catboost: 1.1.1
kmodes: Not installed
mlxtend: Not installed
statsforecast: Not installed
tune_sklearn: Not installed
ray: Not installed
hyperopt: Not installed
optuna: Not installed
skopt: Not installed
mlflow: 2.3.0
gradio: Not installed
fastapi: Not installed
uvicorn: Not installed
m2cgen: Not installed
evidently: Not installed
fugue: Not installed
streamlit: Not installed
prophet: Not installed