-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-9073][ML] spark.ml Models copy() should call setParent when there is a parent #7447
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
Conversation
|
Test build #37502 has finished for PR 7447 at commit
|
|
Test build #38842 has finished for PR 7447 at commit
|
|
@Lewuathe Sorry for the delay, but this would actually be important to get into Spark 1.5. Would you have time to fix the merge conflicts, and then I can make a final pass? Thank you! |
|
@jkbradley I merged master into this branch. Could you check it? Thank you! |
|
Test build #39661 has finished for PR 7447 at commit
|
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.
fix indentation
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.
organize imports (Please check below for other files too.)
|
@Lewuathe Thanks for the update. Looking at this again, I've become more convinced that the check should piggy-back on other tests. For most models, it fits naturally with the standard ParamsSuite.checkParams check. For a few models, it's pretty expensive to add a unit test which requires fitting a new model. Could you please put the check into existing unit tests? |
|
Test build #40081 has finished for PR 7447 at commit
|
|
Test build #40106 has finished for PR 7447 at commit
|
|
@jkbradley Could you check it? We can keep separate test case because some suite such as |
|
Test build #40289 has finished for PR 7447 at commit
|
|
@Lewuathe I realized my suggestion of including the check within the Params check was not a good idea since those checks create models without parents. (The parent check therefore just ensures that null equals null.) Sorry for asking for yet another update, but could you please update the tests to piggy-back off of other tests which create models via fit()? Those tests will create models with actual parents, so that the checkCopy() method will do a reasonable test. Please let me know if this makes sense to you. Thank you! |
|
@jkbradley That sounds good to me at last. I'll update. Thank you! |
|
Test build #40449 has finished for PR 7447 at commit
|
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.
fix indentation
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.
This should be in a different test. The model should be produced via fit(), not constructed from scratch, so that the model has a parent.
|
Test build #40625 has finished for PR 7447 at commit
|
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.
I should have been clearer: Can you please check both that the uids match and the equality operator?
assert(copied.parent.uid == model.parent.uid)
assert(copied.parent == model.parent)
|
Looks good except that 1 item |
|
Test build #40759 has finished for PR 7447 at commit
|
|
LGTM. Merging with master and branch-1.5 |
…here is a parent Copied ML models must have the same parent of original ones Author: lewuathe <[email protected]> Author: Lewuathe <[email protected]> Closes #7447 from Lewuathe/SPARK-9073. (cherry picked from commit 2932e25) Signed-off-by: Joseph K. Bradley <[email protected]>
…here is a parent Copied ML models must have the same parent of original ones Author: lewuathe <[email protected]> Author: Lewuathe <[email protected]> Closes apache#7447 from Lewuathe/SPARK-9073.
Copied ML models must have the same parent of original ones