-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG + 1] FIX Include PyFuncDistance attributes while pickling. #4362
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
[MRG + 1] FIX Include PyFuncDistance attributes while pickling. #4362
Conversation
The general idea looks good. This will need a test, of course :) |
@GaelVaroquaux Thanks :) Have added the tests! Please take a look now! Also @jakevdp could you take a look at this too pl? |
|
||
def check_pickle_protocol(protocol): | ||
s = pickle.dumps(bt1, protocol=protocol) | ||
bt2 = pickle.loads(s) | ||
|
||
s_pyfunc = pickle.dumps(bt1_pyfunc, protocol=protocol) | ||
bt2_pyfunc = pickle.loads(s_pyfunc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did that fail on master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! but this particular line will pass, querying alone will fail. (new line #+242)
e583cef
to
2e982ce
Compare
@jakevdp @amueller @GaelVaroquaux Any update on this? :) |
Any news on this? :) |
2e982ce
to
dd043be
Compare
LGTM |
0c3ae8c
to
d9284aa
Compare
d9284aa
to
a685fe5
Compare
LGTM as well. Merging. |
[MRG + 1] FIX Include PyFuncDistance attributes while pickling.
fixes #4360
func
andkwargs
attributes during picklingPickle and include theNot needed!dist_metric
function.