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

adding optional use of cloudpickle module #36

Merged
merged 1 commit into from
Oct 19, 2015

Conversation

fbnrst
Copy link
Contributor

@fbnrst fbnrst commented Oct 19, 2015

A PR from a clean branch based on the discussion in #35.

ihrke added a commit that referenced this pull request Oct 19, 2015
adding optional use of cloudpickle module
@ihrke ihrke merged commit 65baceb into rossant:master Oct 19, 2015
@ihrke
Copy link
Collaborator

ihrke commented Oct 19, 2015

Thanks, again!

@ihrke
Copy link
Collaborator

ihrke commented Oct 19, 2015

btw, just thought about something: what happens if you pickle.load() a lambda-function that has been pickled with cloudpickle? This is what always happens, the way we are currently handling it...

@fbnrst
Copy link
Contributor Author

fbnrst commented Oct 19, 2015

@rossant
Copy link
Owner

rossant commented Oct 19, 2015

thanks @fabianrost84 !

@fbnrst
Copy link
Contributor Author

fbnrst commented Oct 20, 2015

Now, I was wondering if the except clause should only handle ImportError. Could there possibly be another exception for that we want to fall back to the standard pickle module for dumping? E.g. a broken cloudpickle module that can be imported but does not provide a dumpfunction. So should we maybe let all exceptions being handled like that:

try:
   import cloudpickle
   dump = cloudpickle.dump
except:
   dump = pickle.dump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants