-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix: Fix index out of bounds in uniform_hist_count #20133
Merged
Merged
Conversation
This file contains 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
iharthi
changed the title
fix(rust): fix index out of bounds in uniform_hist_count
fix(rust): Fix index out of bounds in uniform_hist_count
Dec 3, 2024
github-actions
bot
added
fix
Bug fix
rust
Related to Rust Polars
and removed
title needs formatting
labels
Dec 3, 2024
iharthi
force-pushed
the
fix-hist-index-out-of-bounds
branch
from
December 3, 2024 15:05
4f00e8e
to
4a5036a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #20133 +/- ##
==========================================
+ Coverage 79.53% 79.57% +0.03%
==========================================
Files 1562 1563 +1
Lines 217148 217396 +248
Branches 2465 2472 +7
==========================================
+ Hits 172707 172985 +278
+ Misses 43880 43843 -37
- Partials 561 568 +7 ☔ View full report in Codecov by Sentry. |
Thanks, could you add a minimal test on the python side? |
iharthi
force-pushed
the
fix-hist-index-out-of-bounds
branch
from
December 3, 2024 16:21
4a5036a
to
0aefdbf
Compare
iharthi
requested review from
alexander-beedie,
MarcoGorelli and
reswqa
as code owners
December 3, 2024 16:21
Sometimes, index out of bounds happened in uniform_hist_count in cases when due to floating point representation imprecision idx value went over the maximum index (num_bins - 1).
iharthi
force-pushed
the
fix-hist-index-out-of-bounds
branch
from
December 3, 2024 16:26
0aefdbf
to
00688ad
Compare
ritchie46
reviewed
Dec 4, 2024
ritchie46
changed the title
fix(rust): Fix index out of bounds in uniform_hist_count
fix: Fix index out of bounds in uniform_hist_count
Dec 4, 2024
2 tasks
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.
Sometimes, index out of bounds happened in uniform_hist_count in cases when due to floating point representation imprecision idx value went over the maximum index (num_bins - 1). Example error message:
To work around the issue, add an explicit check that forces value into expected number of intervals. I am not entirely sure this is mathematically correct solution, but it seems to work well.
I added a test that fails on current main branch on my machine just in case, but I know for sure it does not fail with error in other environments (like google colab, for example) .