Skip to content

Fix BatchICACollector fig_pr_cycle KeyError on cycle_num - #684

Merged
jepegit merged 1 commit into
masterfrom
679-batch-ica-collector
Jul 25, 2026
Merged

Fix BatchICACollector fig_pr_cycle KeyError on cycle_num#684
jepegit merged 1 commit into
masterfrom
679-batch-ica-collector

Conversation

@jepegit

@jepegit jepegit commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • ICA collected frames use cycle; _cycles_plotter / sequence_plotter were hardcoding cycle_num / .cycle, so BatchICACollector(..., plot_type="fig_pr_cycle") crashed with KeyError: 'cycle_num' on v2.0.0rc1.
  • Count and filter via the cycle-column argument (z); filter before the fig_pr_cycle z/g swap. Also fix cycles_plotter's too-many-cycles branch for capacity frames.
  • Add essential collector tests for ICA and capacity-curve fig_pr_cycle.

Test plan

  • MPLBACKEND=Agg uv run pytest tests/test_collectors.py
  • MPLBACKEND=Agg uv run pytest -m essential
  • Smoke: BatchICACollector(b, plot_type="fig_pr_cycle", cycles=[1, 2, 3]) (issue repro)

Closes #679

Made with Cursor

ICA frames use the cycle column; plotters were hardcoding cycle_num when
counting and filtering for fig_pr_cycle, which crashed on v2.0.0rc1.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 25, 2026

Copy link
Copy Markdown

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.

@jepegit
jepegit enabled auto-merge (squash) July 25, 2026 11:54
@jepegit
jepegit merged commit 9c51ba9 into master Jul 25, 2026
6 checks passed
@jepegit
jepegit deleted the 679-batch-ica-collector branch July 25, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug in BatchICACollector

1 participant