Skip to content

refactor(orchestrator): fold packing.py into batch.py - #3842

Merged
samsja merged 1 commit into
mainfrom
refactor/fold-packing
Oct 4, 2026
Merged

samsja merged 1 commit into
mainfrom
refactor/fold-packing

Conversation

@faresobeid

@faresobeid faresobeid commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Moves BatchPacker (35 lines) from orchestrator/packing.py into orchestrator/batch.py and deletes packing.py. The class only wraps build_bin_cost and prepare_batch, which already live in batch.py.

Item 6 of the orchestrator review.

Behavior change: none (pure move; the import in orchestrator.py is updated).

Checks

  • pytest tests/unit/orchestrator tests/unit/test_configs* -m "not gpu": 291 passed
  • ruff check, ruff format --check: clean
  • python -c "import prime_rl.orchestrator.orchestrator" OK
  • Equivalence: the class body is copied byte for byte (git diff shows only the move and the import lines).

GPU checks: none needed.

Conflicts


Note

Low Risk
Pure file move and import path update with no logic changes to training batch packing.

Overview
Colocates batch packing with the bin-packing helpers it already delegates to.

BatchPacker moves from orchestrator/packing.py into orchestrator/batch.py next to build_bin_cost and prepare_batch; packing.py is removed. The orchestrator now imports BatchPacker from batch instead of packing. Class behavior and pack() semantics are unchanged.

Reviewed by Cursor Bugbot for commit 986f5bf. Bugbot is set up for automated code reviews on this repo. Configure here.

@faresobeid
faresobeid marked this pull request as ready for review October 4, 2026 12:29
@samsja samsja closed this Oct 4, 2026
@faresobeid faresobeid reopened this Oct 4, 2026
@faresobeid
faresobeid force-pushed the refactor/fold-packing branch from 48c0821 to 986f5bf Compare October 4, 2026 23:25
@samsja
samsja merged commit cf9962c into main Oct 4, 2026
19 of 20 checks passed
@samsja
samsja deleted the refactor/fold-packing branch October 4, 2026 23:50
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.

2 participants