-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[MINOR][ML] Increase Bounded MLOR (without regularization) test error tolerance #30587
Conversation
Test build #132107 has finished for PR 30587 at commit
|
Test build #132108 has finished for PR 30587 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #132109 has finished for PR 30587 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #132117 has finished for PR 30587 at commit
|
Kubernetes integration test starting |
if (math.abs(v1) < 1E-5 || math.abs(v2) < 1E-5) { | ||
// If one of v1 and v2 is very close to zero, then compare absTol | ||
assert(v1 ~= v2 absTol 1E-2, s"v1 ~= v2 absTol 0.01 faild: v1=${v1}, v2=${v2}") | ||
} |
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.
nit: lint
assert(v1 ~= v2 absTol 1E-2, s"v1 ~= v2 absTol 0.01 faild: v1=${v1}, v2=${v2}") | ||
} | ||
else { | ||
assert(v1 ~= v2 relTol 1E-2, s"v1 ~= v2 relTol 0.01 faild: v1=${v1}, v2=${v2}") |
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 guess you can keep previous logic v1 ~= v2 absTol 1E-3
here.
Kubernetes integration test status failure |
Kubernetes integration test starting |
Test build #132127 has finished for PR 30587 at commit
|
Kubernetes integration test status success |
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.
Hm, is this the best fix? a difference of 0.0001 vs 0.0002 could be significant. Do we just need to run LR more iterations instead?
One possibility is that, the result value will converge to 0, but in limited iterations, it may result in some near zero value like such as 1e-4 or 2e-4, @zhengruifeng Could you help check whether increase iteration will help make than converge fast enough to be zero ? Not sure the best threshold to set here for go into the branch of absTol test. Note: the probably failed test is the |
If that's true, then isn't the 'right' expected value 0, and we're looking for a value at most some epsilon? |
Reasonable. We should set expected value to be 0. Need check test code.
Resonable. Found some other issue in test code. Let me check. |
I had found that solver When data is shuffled or blockified with different blocksize, |
The master code use some weird logic to compare:
change it to compare left and right directly. |
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.
Maybe this is fine as a band-aid but still feels funky. Can we simply loosen the tolerance if we can't figure it out, or run more iterations etc to improve stability in the test? maybe even different initial conditions.
According to the comments, it looks that this compare logic is designed on purpose. @WeichenXu123 |
Kubernetes integration test starting |
Test build #132169 has finished for PR 30587 at commit
|
Kubernetes integration test status success |
Kubernetes integration test starting |
Test build #132194 has finished for PR 30587 at commit
|
Kubernetes integration test status failure |
@srowen Is this change ok now? |
I think it's OK as a band-aid and OK to back port |
@WeichenXu123 go ahead and merge and backport if you need it in 3.1 |
… tolerance ### What changes were proposed in this pull request? Improve LogisticRegression test error tolerance ### Why are the changes needed? When we switch BLAS version, some of the tests will fail due to too strict error tolerance in test. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? N/A Closes #30587 from WeichenXu123/fix_lor_test. Authored-by: Weichen Xu <weichen.xu@databricks.com> Signed-off-by: Weichen Xu <weichen.xu@databricks.com> (cherry picked from commit f021f6d) Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
merge to master and branch-3.1, thanks! |
What changes were proposed in this pull request?
Improve LogisticRegression test error tolerance
Why are the changes needed?
When we switch BLAS version, some of the tests will fail due to too strict error tolerance in test.
Does this PR introduce any user-facing change?
No
How was this patch tested?
N/A