-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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 more global categorical issues #20547
Conversation
@@ -114,7 +114,7 @@ jobs: | |||
const previousSizeMB = previousSize !== 'Unknown' ? (previousSize / 1024 / 1024).toFixed(4) : 'Unknown'; | |||
const currentSizeMB = currentSize !== 'Unknown' ? (currentSize / 1024 / 1024).toFixed(4) : 'Unknown'; | |||
let commentBody = `The previous wheel size was **${previousSizeMB} MB**.\nThe current wheel size after this PR is **${currentSizeMB} MB**.`; | |||
let commentBody = `The uncompressed binary size was **${previousSizeMB} MB**.\nThe uncompressed binary size after this PR is **${currentSizeMB} MB**.`; |
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.
driveby
The uncompressed binary size was Unknown MB. |
Almost there, import polars as pl
pl.enable_string_cache()
pl.Series(["aaa", "bbb", "ccc"], dtype=pl.Categorical) # pre-fill cache
# test_fast_unique_flag_from_arrow
df = pl.DataFrame({
"colB": pl.Series(["1", "2", "3", "4", "5", "5", "5", "5"], dtype=pl.Categorical)
})
filtered = df.to_arrow().filter([True, False, True, True, False, True, True, True])
pl.from_arrow(filtered).select(pl.col("colB").n_unique())
# pyo3_runtime.PanicException: assertion failed: TotalOrd::tot_le(v, self.range.end()) |
@ritchie46 here is a simpler repro: import polars as pl
pl.enable_string_cache()
pl.Series(["aaa", "bbb", "ccc"], dtype=pl.Categorical) # pre-fill cache
s = pl.Series(["1", "2", "3"], dtype=pl.Categorical)
s = s.filter([True, False, True])
s.n_unique()
# pyo3_runtime.PanicException: assertion failed: TotalOrd::tot_le(v, self.range.end()) A few notes:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #20547 +/- ##
==========================================
- Coverage 79.05% 79.00% -0.06%
==========================================
Files 1564 1564
Lines 220627 220618 -9
Branches 2502 2502
==========================================
- Hits 174413 174291 -122
- Misses 45640 45753 +113
Partials 574 574 ☔ View full report in Codecov by Sentry. |
Got it |
@ritchie46 all pass now! Nice. I will note that I don't think we have any tests that cover the |
The uncompressed binary size was Unknown MB. |
I removed the uses of that kernel, so I think that's the reason it isn't hit. |
@mcrumiller FYI