Fix batch-summary benchmark: use native combine_summaries, drop xfail - #749
Merged
Conversation
`test_benchmark_batch_summary_collection` was xfailed pending the Epic C polars migration, calling the old pandas `helpers.concat_summaries` (which now raises `AttributeError: 'DataFrame' object has no attribute 'index'` on polars summary frames). An xfailed benchmark records no result, so `check_baseline.py` reports `missing benchmark 'test_benchmark_batch_summary_collection' in current run` and the benchmark CI check fails. Epic B/C is done, so this migrates the benchmark to the native collector path (`Batch.combine_summaries` -> `cellpy.batch.combine_summaries`, returning a polars frame) and removes the xfail. The benchmark now runs and records a result again; local mean is ~1.19x the committed baseline (well within the +100% fail band — the baseline can be refreshed on CI when convenient). 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.
Problem
The benchmark CI check fails with:
test_benchmark_batch_summary_collectionwasxfailed pending the Epic C polars migration, still calling the old pandashelpers.concat_summaries— which now raisesAttributeError: 'DataFrame' object has no attribute 'index'on the polars summary frames. An xfailed benchmark records no result, socheck_baseline.pysees it absent from the current run and fails (it treats a baseline benchmark missing from the run as a regression).Fix
Epic B/C is done, so this does what the xfail note said to do "then": migrate the benchmark to the native collector path —
Batch.combine_summaries()→cellpy.batch.combine_summaries(returns a polars frame) — and remove thexfail. The benchmark runs and records a result again.Verification
pytest benchmarks/test_performance.py::test_benchmark_batch_summary_collection --benchmark-only→ 1 passed (was1 xfailed).check_baseline.pyno longer reports it missing. The committed baseline value can be refreshed on CI when convenient (it was captured against the old pandas path).🤖 Generated with Claude Code