B2: port concat_summaries feature set onto collect options (#706) - #736
Merged
Conversation
…706) Carry the meaty three feature families of the legacy helpers.concat_summaries onto SummaryOptions / collect_summaries, polars-native and using the cell's schema headers (the legacy headers_summary / headers_step_table are deprecated-for-removal in 2.1): - rate filtering: keep only cycles whose rate_on step ran at the requested C-rate (rate/rate_on/rate_std/rate_column/inverse/inverted), ported from select_summary_based_on_rate as a polars step mask. - group averaging: average per journal group into a tidy long frame (group, cycle_num, variable, mean, std), ported from _make_average + collect_frames; keeps the "<2 cells per group disables grouping" guard and names the aggregate "mean" regardless of average_method. - CV partition: split each numeric metric into *_non_cv / *_cv via make_summary(exclude_step_types=["cv_"]), ported from _partition_summary_based_on_cv_steps; column selection expands to keep the derived split. Plus max_cycle / remove_last / only_selected cycle selection, normalized (equivalent) cycle exposure, and inf/extreme cleanup. Per-cell cycle work lives in collect/_summary_ops.py; combination, selection, averaging and cleanup orchestrate in collect/summary.py. Adds golden tests for each. Closes #706 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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.
Epic B, arc B2 (#706) — the collectors feature port
Carries the meaty three feature families of the legacy
helpers.concat_summariesonto theSummaryOptionsmodel built in B1, polars-native and using the cell'sschemaheaders (the legacyheaders_summary/headers_step_tablesingletons are deprecated-for-removal in 2.1).Feature families
rate_onstep ran at the requested C-rate (rate/rate_on/rate_std/rate_column/rate_inverse/rate_inverted). Ported fromselect_summary_based_on_rateas a polars step mask returning surviving cycles.(group, cycle_num, variable, mean, std). Ported from_make_average+collect_frames; keeps the "<2 cells per group disables grouping" guard and names the aggregatemeanregardless ofaverage_method(backward-compat).*_non_cv/*_cvviamake_summary(exclude_step_types=["cv_"]). Ported from_partition_summary_based_on_cv_steps; column selection expands to keep the derived split.Plus
max_cycle/remove_last/only_selectedcycle selection, normalized (equivalent) cycle exposure, and inf/extreme cleanup.Layout
collect/_summary_ops.py— per-cell polars ops (rate mask, CV partition, extraction, cleanup, group average).collect/summary.py— orchestration: per-cell extract → combine → select → group-average → cleanup → transforms.collect/options.py—SummaryOptionsgrown to the full pipeline, one source of truth (replaces ~30concat_summarieskwargs).Tests
tests/test_collect.py— golden tests for max_cycle, rate filter (+ inverted), CV columns, and group averaging (mean/std values checked). Full local run: 52 passed, 5 planned xfails (B3/B4 collectors placeholders).Closes #706