Skip to content

test: fix stale fixtures in test_loop_cleanup#139

Merged
torchspec-bot merged 1 commit into
lightseekorg:mainfrom
abatilo:fix-tests-on-main
Jul 1, 2026
Merged

test: fix stale fixtures in test_loop_cleanup#139
torchspec-bot merged 1 commit into
lightseekorg:mainfrom
abatilo:fix-tests-on-main

Conversation

@abatilo

@abatilo abatilo commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Four tests failed on main because the fixtures had fallen behind the
production code they exercise:

  • test_run_training_loop_finally_runs_cleanup_on_{success,exception}
    asserted the _safe_training_cleanup call without inference_engines,
    but run_training_loop now forwards inference_engines to it. Add
    inference_engines=None to both assert_called_once_with calls.

  • test_setup_eval_dispatch_bs_{is_dp_size,caps_at_dataset_size} built
    SimpleNamespace args lacking inference_batch_size, which setup_eval
    now reads on the eval-cache-miss branch. Add inference_batch_size=4;
    it satisfies both assertions while preserving each test's intent
    (dp_size*2 binds in the first, dataset_size cap binds in the second).

Test-only change: the production code is correct; the tests were stale.
tests/test_loop_cleanup.py now passes 9/9.

Four tests failed on main because the fixtures had fallen behind the
production code they exercise:

- test_run_training_loop_finally_runs_cleanup_on_{success,exception}
  asserted the _safe_training_cleanup call without inference_engines,
  but run_training_loop now forwards inference_engines to it. Add
  inference_engines=None to both assert_called_once_with calls.

- test_setup_eval_dispatch_bs_{is_dp_size,caps_at_dataset_size} built
  SimpleNamespace args lacking inference_batch_size, which setup_eval
  now reads on the eval-cache-miss branch. Add inference_batch_size=4;
  it satisfies both assertions while preserving each test's intent
  (dp_size*2 binds in the first, dataset_size cap binds in the second).

Test-only change: the production code is correct; the tests were stale.
tests/test_loop_cleanup.py now passes 9/9.
@torchspec-bot torchspec-bot merged commit 014733f into lightseekorg:main Jul 1, 2026
1 of 2 checks passed
@abatilo abatilo deleted the fix-tests-on-main branch July 1, 2026 15:16
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