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

Merged
merged 3 commits into from May 22, 2015

Conversation

Projects
None yet
5 participants
@raghavrv
Member

raghavrv commented Mar 9, 2015

fixes #4360

  • Include func and kwargs attributes during pickling
  • NRT

Pickle and include the dist_metric function. Not needed!

@raghavrv raghavrv changed the title from FIX Include PyFuncDistance attributes while pickling. to [WIP] FIX Include PyFuncDistance attributes while pickling. Mar 9, 2015

@GaelVaroquaux

This comment has been minimized.

Member

GaelVaroquaux commented Mar 9, 2015

The general idea looks good. This will need a test, of course :)

@raghavrv

This comment has been minimized.

Member

raghavrv commented Mar 9, 2015

@GaelVaroquaux Thanks :) Have added the tests! Please take a look now!

Also @jakevdp could you take a look at this too pl?

@raghavrv raghavrv changed the title from [WIP] FIX Include PyFuncDistance attributes while pickling. to [MRG] FIX Include PyFuncDistance attributes while pickling. Mar 9, 2015

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)

This comment has been minimized.

@amueller

amueller Mar 9, 2015

Member

did that fail on master?

This comment has been minimized.

@raghavrv

raghavrv Mar 10, 2015

Member

Yes! but this particular line will pass, querying alone will fail. (new line #+242)

@coveralls

This comment has been minimized.

coveralls commented Mar 18, 2015

Coverage Status

Coverage increased (+0.0%) to 95.09% when pulling 2e982ce on ragv:make_PyFuncDistance_picklable into c4df19d on scikit-learn:master.

@raghavrv

This comment has been minimized.

Member

raghavrv commented Mar 23, 2015

@jakevdp @amueller @GaelVaroquaux Any update on this? :)

@raghavrv

This comment has been minimized.

Member

raghavrv commented Apr 27, 2015

Any news on this? :)

@amueller

This comment has been minimized.

Member

amueller commented Apr 29, 2015

LGTM

@amueller amueller changed the title from [MRG] FIX Include PyFuncDistance attributes while pickling. to [MRG + 1] FIX Include PyFuncDistance attributes while pickling. Apr 29, 2015

@ogrisel

This comment has been minimized.

Member

ogrisel commented May 22, 2015

LGTM as well. Merging.

ogrisel added a commit that referenced this pull request May 22, 2015

Merge pull request #4362 from rvraghav93/make_PyFuncDistance_picklable
[MRG + 1] FIX Include PyFuncDistance attributes while pickling.

@ogrisel ogrisel merged commit 3af811e into scikit-learn:master May 22, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@raghavrv raghavrv deleted the raghavrv:make_PyFuncDistance_picklable branch Feb 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment