-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
[SPARK-18901][ML]:Require in LR LogisticAggregator is redundant #17478
Conversation
Test build #75382 has finished for PR 17478 at commit
|
I guess I don't see the harm in keeping these checks. Yes, in this case we always call If this were a performance fix, I'd support it. I don't think it is, and so I think the code is more readable and clear if we keep the checks. |
@sethah Thanks for your reply! Your suggestion makes sense to me. My intention was to close the JIRA by simple fix. How about we add a test for these checks and close the original JIRA? or you think just mark that JIRA as WON'T Fix? Thanks! |
Yeah, I would support adding a unit test to the logistic aggregator (well, all aggregators) for these types of things. I do think it's better to keep them and add a couple tests, but I don't feel too strongly about it. Thoughts? Also, ping @hhbyyh |
Thanks for @wangmiao1981 for the PR and @sethah for the comments. Maybe I should be more clear when I created the jira. I would prefer to remove the require here permanently. The relevant operation (especially And for the general code practice, I would not keep unnecessary code unless there's clear plan for it. That's just personal preference. cc @jkbradley |
Checking the size is a constant time operation, but in |
I agree with @hhbyyh in this case. The check for feature dimension should only be carried out once rather than running in each iteration, and actually we have checked this before iterations. |
Merged into master and branch-2.2. Thanks for all. |
## What changes were proposed in this pull request? In MultivariateOnlineSummarizer, `add` and `merge` have check for weights and feature sizes. The checks in LR are redundant, which are removed from this PR. ## How was this patch tested? Existing tests. Author: wm624@hotmail.com <wm624@hotmail.com> Closes #17478 from wangmiao1981/logit. (cherry picked from commit 90264ac) Signed-off-by: Yanbo Liang <ybliang8@gmail.com>
@wangmiao1981 Would you mind to send a follow-up PR to address the same issue for |
@yanboliang I will do it. Thanks! |
…dant ## What changes were proposed in this pull request? This is a follow-up PR of apache#17478. ## How was this patch tested? Existing tests Author: wangmiao1981 <wm624@hotmail.com> Closes apache#17754 from wangmiao1981/followup.
…dant ## What changes were proposed in this pull request? This is a follow-up PR of #17478. ## How was this patch tested? Existing tests Author: wangmiao1981 <wm624@hotmail.com> Closes #17754 from wangmiao1981/followup. (cherry picked from commit 387565c) Signed-off-by: Yanbo Liang <ybliang8@gmail.com>
## What changes were proposed in this pull request? In MultivariateOnlineSummarizer, `add` and `merge` have check for weights and feature sizes. The checks in LR are redundant, which are removed from this PR. ## How was this patch tested? Existing tests. Author: wm624@hotmail.com <wm624@hotmail.com> Closes apache#17478 from wangmiao1981/logit.
What changes were proposed in this pull request?
In MultivariateOnlineSummarizer,
add
andmerge
have check for weights and feature sizes. The checks in LR are redundant, which are removed from this PR.How was this patch tested?
Existing tests.