-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Labels
BugSomething isn't working.Something isn't working.Machine Learning - ClassificationClassification Metrics, Classification Models (RF Classifier, XGBOOST Classifier, Logit...)Classification Metrics, Classification Models (RF Classifier, XGBOOST Classifier, Logit...)
Description
Discussed in #1351
Originally posted by okankcb July 3, 2025
Hello,
We encountered an issue using predict_proba after calling load_model in VerticaPy versions 1.0.5 and 1.1.1.
After loading a saved model using load_model, calling predict_proba executes without error, but does not return the expected probability columns.
Work fine in :
- VerticaPy 0.12
Issue reproducible in :
- Verticapy 1.0.5
- Verticapy 1.1.1
Reproducible example with VerticaPy 1.0.5 and 1.1.1 :
from verticapy.machine_learning.vertica import RandomForestClassifier
drop(name = schema +".model_titanic_test_rfc", method = "model")
model = RandomForestClassifier(name = schema +".model_titanic_test_rfc")
model.fit(titanic,["age","fare"], "survived")
from verticapy.machine_learning.vertica.model_management import load_model
model=load_model(schema + ".model_titanic_test_rfc")
model.predict_proba(titanic,
X = ["age","fare"],
name = "predict_proba")
As a temporary solution while waiting for a fix, saving and loading the model using Python's pickle library works correctly. Example :
import pickle
from verticapy.machine_learning.vertica import RandomForestClassifier
drop(name = schema + ".model_titanic_recette_test_rfc", method = "model")
model = RandomForestClassifier(name = schema + ".model_titanic_recette_test_rfc")
model.fit(titanic_recette, ["age", "fare"], "survived")
with open("model_titanic_rfc.pkl", "wb") as f:
pickle.dump(model, f)
with open("model_titanic_rfc.pkl", "rb") as f:
model_loaded = pickle.load(f)
model_loaded.predict_proba(titanic_recette, ["age", "fare"])
Please let us know if :
- A specific parameter must be set to return the probability columns after load_model
- Or if a fix or patch is planned
Best regards,
Okan Kocabiyik
Metadata
Metadata
Assignees
Labels
BugSomething isn't working.Something isn't working.Machine Learning - ClassificationClassification Metrics, Classification Models (RF Classifier, XGBOOST Classifier, Logit...)Classification Metrics, Classification Models (RF Classifier, XGBOOST Classifier, Logit...)