diff --git a/fastvideo/tests/train/models/test_pika_h3_flex_qad.py b/fastvideo/tests/train/models/test_pika_h3_flex_qad.py index 1de5e0843..aa6bf4231 100644 --- a/fastvideo/tests/train/models/test_pika_h3_flex_qad.py +++ b/fastvideo/tests/train/models/test_pika_h3_flex_qad.py @@ -255,3 +255,69 @@ def test_calibration_choice_all_tokens_or_balanced(): assert report["b0.ff.fc_in"]["best"] == "0.5x_max" table, _ = calibrate.choose_table(mse, candidates, "all") assert table == {"b0.ff.fc_in": 10.0} + + +def _builder_module(): + path = Path(__file__).resolve().parents[4] / "scripts/distill/pika_h3_flex_qad/build_flex_ref2va_rows.py" + spec = importlib.util.spec_from_file_location("build_flex_ref2va_rows", path) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +_PROMPT = "subject_definitions: is the exact first frame of the target video.\n\nsummary: A dog runs." + + +def _v4_entry(case: str, refs: list[dict], clip: str = "asset-" + "a" * 32 + "_f000001_f000124_x") -> dict: + return { + "case": case, + "id": f"{case}:{clip}" if case in ("first_frame", "first_last_frame", "storyboard") else clip, + "resolution": "480p", + "prompt": _PROMPT, + "references": refs, + "target": {"height": 480, "width": 832, "num_frames": 124}, + "target_clip_id": clip, + } + + +def test_builder_adds_subject_definitions_in_order(): + builder = _builder_module() + after = builder._subject(_PROMPT, "