Skip to content

bench: refactor screen/flavor/loan launchers onto gpu_pool.fan_out #125

Description

@davorrunje

Context

PR #117 factored the launchers' shared work-stealing GPU subprocess pool into benchmarks/_common/gpu_pool.py:fan_out and refactored benchmarks/stage2_launch.py to use it. Three other launchers still carry their own duplicate device-queue + ThreadPoolExecutor implementations of the same pattern:

  • benchmarks/screen_launch.py
  • benchmarks/flavor_ablation_launch.py
  • benchmarks/loan_ladder_launch.py

Goal

Refactor those three launchers onto gpu_pool.fan_out, removing the duplicated pool code (as was done for stage2_launch).

Where

  • The three files above (each has its own ThreadPoolExecutor + Queue fan-out).
  • benchmarks/_common/gpu_pool.py:fan_out — the shared helper (cmd_builder(item, device) -> list[str], sets $MONONET_TORCH_DEVICE).
  • Tests: tests/benchmarks/test_screen_launch.py, test_flavor_ablation_launch.py, test_loan_ladder_launch.py — update the subprocess.run monkeypatch target to benchmarks._common.gpu_pool.subprocess.run (as done for test_stage2_launch.py in feat(bench): HP-search sensitivity curves (spec + plan + implementation) #117).

Acceptance criteria

  • All three launchers build their per-item command and delegate fan-out to fan_out; no residual ThreadPoolExecutor/Queue in them.
  • Their existing tests pass (patch target updated).

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfollow-upDeferred work captured as a self-contained issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions