-
Notifications
You must be signed in to change notification settings - Fork 611
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
CosineRecommender isn't pickable #191
Comments
I have encountered recently the same issue as you. My quick solution which definitely is not the best one is as follows: assign model scorer to a temporary variable, assign 0 to the model scorer, pickle the fitted model, and finally assign the value of the temporary variable to the model scorer. Hopefully, this issue will be fixed in the future versions. |
This PR adds support for pickling knn models: #229 |
fix is in v0.3.9 |
Hi,
Thanks for great news.
Best regards,
Marin Krešo
sub, 13. srp 2019. 18:52 Ben Frederickson <[email protected]> je
napisao:
… This PR adds support for pickling knn models: #229
<#229>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#191?email_source=notifications&email_token=AEYHERND4WUFMW4TC4XIZU3P7IB4NA5CNFSM4G7JVSAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ3VLDA#issuecomment-511137164>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEYHERI4KUW3VYBSDPR7IT3P7IB4NANCNFSM4G7JVSAA>
.
|
I created CosineRecommender model and fitted it to my dataset. When I try to pickle the fitted model with
pickle.dumps(model)
I getTypeError: no default __reduce__ due to non-trivial __cinit__
error in because of NearestNeighboursScorer.reduce_cython() method.Pickling AlternatingLeastSquares model works great.
Is there a way to pickle CosineRecommender model or to use some other serialization method for serializing this object/model?
The text was updated successfully, but these errors were encountered: