Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpliftRandomForestClassifier Model object cannot be pickled when saving as joblib #588

Open
maheshv26 opened this issue Dec 10, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@maheshv26
Copy link

UpliftRandomForestClassifier Model object cannot be pickled when saving as joblib. There seems to be no way to save UpliftRandomForestClassifier Model object

@maheshv26 maheshv26 added the bug Something isn't working label Dec 10, 2022
@jroessler
Copy link
Contributor

You can use pickle:

import pickle
pickle.dump(urf_model, open("urf-model.pickle", 'wb'))

where urf_model is the fitted UpliftRandomForestClassifier

@GeTuojian
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants