-
Notifications
You must be signed in to change notification settings - Fork 167
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
Catches the exception from pickle.whichmodule() #112
Conversation
Codecov Report
@@ Coverage Diff @@
## master #112 +/- ##
==========================================
+ Coverage 83.12% 83.66% +0.54%
==========================================
Files 2 2
Lines 551 557 +6
Branches 107 107
==========================================
+ Hits 458 466 +8
+ Misses 65 64 -1
+ Partials 28 27 -1
Continue to review full report at Codecov.
|
Travis passes, the only thing that doesn't pass is a drop in coverage. If you want to make sure your case in spark is covered, I recommend adding a test. |
Will give a shot. Thanks for your guidance. |
9c853d9
to
4062d3a
Compare
I just added the test cases. |
Awesome, thank you @HyukjinKwon! |
Thank you @rgbkrk! |
This PR proposes to port apache/spark@d7223bb in PySpark into cloudpickle.
In short,
pickle.whichmodule
could fail, for example, in case ofsix
- https://bitbucket.org/gutworth/six/issues/63/importing-six-breaks-pickling and it looks failed ingetattr
.In such case, it looks nicer just to use
__main__
for the module name, which I believe we use when we can't find the module rather than throwing an exception. True, it is rather a band-aid fix but I believe this could be more beneficial in practice.Please check out the details in https://bitbucket.org/gutworth/six/issues/63/importing-six-breaks-pickling and https://issues.apache.org/jira/browse/SPARK-16077