Repository navigation
test(vlm): adopt the #4946 edge-pad strip in pretokenized calibration tests (#5325) - #6265
Merged
Merged
Conversation
A6/A13 were already realigned on main by #5535 (95c4ad9), which is why the pretokenized VLM calibration nodes are green today. The realigned tests cover the leading edge, an interior caller mask, and one qwen3.5 trailing case, but no test asserts the trailing edge or the all-padding drop across every VLM `prepare_dataset` override. Add `test_both_edge_pads_are_stripped_and_all_pad_rows_dropped` over the same introspection-discovered definition set. It asserts that a trailing tokenizer pad run is stripped, an interior mask zero survives verbatim, and an all-padding row is dropped instead of reaching the looper. With the strip disabled the new node fails 37/37, so it guards the #4946 contract rather than restating the shape oracle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #5325 (items A6, A13)
Status: A6/A13 are already green on
mainBoth items were fixed by #5535 (
95c4ad9faa, "test(vlm): realign pretokenized expectations with #4889 pad stripping"), merged 2026-11-19, and are green at currentmain(2d3261d):test_gemma3_vl_support.py18/18,test_qwen3_5_moe_multimodal_support.py16/16.test_vlm_prepare_dataset_contract_4633.py119/119,test_vlm_pretokenized_calibration.py84/84. The two A13 test functions collect 74 + 17 = 91 nodes today (62 + 17 at triage; the VLM definition list grew from 31 to 37).Red-before is reproducible with the pre-#5535 test content from
ddf11fcc6run against current product code: 2/2 A6 nodes fail and 91/91 A13 nodes fail, all on the same #4946 edge-pad strip ((1, 12)expected vs(1, 11)prepared, plus the stripped row's changed sort order).What this PR adds
#4946 strips contiguous pad positions at either edge, keeps an interior mask zero verbatim, and drops an all-padding row. The realigned tests cover the leading edge, the interior mask, and one qwen3.5 trailing case, but nothing asserts the trailing edge or the all-pad drop across every VLM
prepare_datasetoverride.test_both_edge_pads_are_stripped_and_all_pad_rows_droppedcloses that gap over the same introspection-discovered definition set (37 definitions -> 37 nodes). It asserts:With the strip disabled the new node fails 37/37; with it, 37/37 pass.
Tests
Broader VLM calibration family: 143 passed.
ruff checkclean.No production code changes.