fix(streaming): exact large integers and non-string column labels - #221
Merged
Merged
Conversation
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- StreamingCleaner cast nullable Int*/UInt* columns to float64 before filling them with the running mean/median, so present values beyond 2**53 changed (2**53 + 1 became 2**53). Such columns now keep their integer dtype and get the rounded running statistic via _util.fill_na_exact; the report says so. Columns within +-2**53 keep the float64 behaviour. - StreamingCleaner.clean_batch and fd.clean_timeseries raised KeyError on non-string column labels (e.g. 0, 7): the imputer, drift detection and the time-series steps indexed the frame with str(label). The str name now only keys the running state and report entries; frame access uses the original label. Closes #208 Closes #209
kevincostner17
force-pushed
the
fix/streaming-labels
branch
from
September 14, 2026 19:40
08a9806 to
d1f6a9d
Compare
FreshData benchmark report —
|
| fixture | n_rows | n_cols | p50 s | p95 s | peak MB | repair % | false-repair % | preserve % | trust | monotonic | export % |
|---|
Authored-code reduction (Metric 6)
This was referenced Sep 14, 2026
This file contains hidden or 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
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.
Summary
#208, streaming part:
StreamingCleanerno longer casts nullableInt*/UInt*columns to float64 when filling them from running statistics. That cast changed present values beyond 2**53.kept Int64 so values beyond 2**53 stay exact.#209:
StreamingCleaner.clean_batchandfd.clean_timeseriesno longer raiseKeyErroron non-string column labels.strform of a label now only keys the running state and report entries. Frame access uses the original label._impute/_impute_column,detect_drift, and the time-series interpolation, seasonal and anomaly steps.last_numeric_colsand report columns stay strings.Issue repros on this branch
Output is identical on Python 3.12 / numpy 2.5 and Python 3.9 / pandas 1.5.3:
Tests
tests/test_streaming_cleaner.py: integer labels, including a second batch that runs drift detection; anInt64fill beyond 2**53 keeps the present values and the dtype.tests/test_streaming_timeseries.py: integer labels throughfd.clean_timeseries, with interpolation reported under column"8".Local lane
pytest -m "not online and not large"on Python 3.12 and 3.9: all pass except the five sandbox tests that also fail locally onmain(they need an installed package).ruff check .andmypy src/freshdatapass.Closes #208
Closes #209