Catches the exception from pickle.whichmodule()#112
Merged
rgbkrk merged 2 commits intocloudpipe:masterfrom Aug 7, 2017
Merged
Conversation
Member
Author
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.
|
Member
|
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. |
Member
Author
|
Will give a shot. Thanks for your guidance. |
9c853d9 to
4062d3a
Compare
Member
Author
|
I just added the test cases. |
Member
|
Awesome, thank you @HyukjinKwon! |
Member
Author
|
Thank you @rgbkrk! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes to port apache/spark@d7223bb in PySpark into cloudpickle.
In short,
pickle.whichmodulecould 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