Skip to content

Commit 1a065da

Browse files
committed
test: pin the CUDA device path in video server tests
[skip-sweep]
1 parent 8cfb9b4 commit 1a065da

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎inferencex-e2e/infx/tests/srt_slurm/test_video_selected.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ def test_bound_selected_service_executes_its_engine_and_retains_launch_receipts(
158158
"VIDEO_RESULT_DIR": str(output),
159159
}
160160
bootstrap = (
161-
"import sys; from evaluator import srt_selected; "
161+
"import sys; from pathlib import Path; from evaluator import srt_selected; "
162+
f"srt_selected.KFD = Path({str(tmp_path / 'no-kfd')!r}); "
162163
"srt_selected.cuda_devices=lambda: ['GPU-00000000-0000-0000-0000-000000000001', "
163164
"'GPU-00000000-0000-0000-0000-000000000002']; "
164165
"from infx.bench.video import main; sys.exit(main(sys.argv[1:]))"

‎video-generation/tests/test_srt_selected.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def test_selected_server_executes_recipe_command_and_records_selected_environmen
5656
model = _snapshot(tmp_path / "model")
5757
uuids = ["GPU-1", "GPU-2"]
5858
monkeypatch.setattr(srt_selected, "cuda_devices", lambda: uuids)
59+
monkeypatch.setattr(srt_selected, "KFD", tmp_path / "no-kfd")
5960
executed = []
6061
monkeypatch.setattr(
6162
srt_selected.os, "execvpe", lambda file, argv, env: executed.append((file, argv, env))
@@ -142,6 +143,7 @@ def test_selected_server_requires_the_recipe_gpus_and_runtime(tmp_path, monkeypa
142143
plan = video_spec.plan_for(video_spec.load_spec(PACKAGE / "specs/h3.yaml"), "release-v1")
143144
model = _snapshot(tmp_path / "model")
144145
monkeypatch.setattr(srt_selected, "cuda_devices", lambda: ["GPU-1", "GPU-2"])
146+
monkeypatch.setattr(srt_selected, "KFD", tmp_path / "no-kfd")
145147
kwargs = {
146148
"runtime_revision": "a" * 40,
147149
"model_path": model,

0 commit comments

Comments
 (0)