Skip to content

Commit d471281

Browse files
Catch the cross-architecture warning in the GOLD teacher VLM inputs test (#7728)
1 parent 264d1fd commit d471281

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎tests/experimental/test_gold_trainer.py‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,12 +1576,13 @@ def test_build_teacher_vlm_inputs_feeds_images_and_completion_byte_offsets(tmp_p
15761576
"""Cross-architecture VLM ULD must render the teacher prompt through the teacher processor (so it
15771577
actually sees the image via pixel_values) while keeping completion byte offsets relative to the original completion
15781578
text — the coordinate system shared with the student."""
1579-
trainer = GOLDTrainer(
1580-
model=_TINY_SMOLVLM,
1581-
teacher_model=_TINY_QWEN3_VL,
1582-
args=GOLDConfig(output_dir=str(tmp_path), report_to="none", use_uld_loss=True, use_extended_uld=True),
1583-
train_dataset=vlm_dataset,
1584-
)
1579+
with pytest.warns(UserWarning, match="Cross-architecture VLM distillation"):
1580+
trainer = GOLDTrainer(
1581+
model=_TINY_SMOLVLM,
1582+
teacher_model=_TINY_QWEN3_VL,
1583+
args=GOLDConfig(output_dir=str(tmp_path), report_to="none", use_uld_loss=True, use_extended_uld=True),
1584+
train_dataset=vlm_dataset,
1585+
)
15851586

15861587
images, prompts = trainer._extract_images_and_prompts(vlm_examples)
15871588
completion_texts = _get_assistant_texts(vlm_examples)

0 commit comments

Comments
 (0)