causalml
causalml copied to clipboard
UpliftRandomForestClassifier Model object cannot be pickled when saving as joblib
UpliftRandomForestClassifier Model object cannot be pickled when saving as joblib. There seems to be no way to save UpliftRandomForestClassifier Model object
You can use pickle:
import pickle
pickle.dump(urf_model, open("urf-model.pickle", 'wb'))
where urf_model
is the fitted UpliftRandomForestClassifier
I got the same issue
PicklingError:can't pickle <cyfunction UpliftTreeClassifier.evaluate_KL at 0x7fc2a6f1fd90>:attribute lookup evaluate_KL on causalml.inference.tree.uplift failed
How can I fix it?