Repository navigation
Migrate the remaining 95 testers to static small-config defaults - #50944
Conversation
|
[For maintainers] Suggested jobs to run (before merge) run-slow: afmoe, apertus, aria, audioflamingo3, axk1, axk2, bailing_hybrid, beam, blt, cohere2_moe, cohere_compass, cosmos3_edge, cosmos3_omni, dbrx, deepseek_ocr2, deepseek_v2 |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
run-slow: afmoe, apertus, aria, audioflamingo3, axk1, axk2, bailing_hybrid, beam, blt, cohere2_moe, cohere_compass, cosmos3_edge, cosmos3_omni, dbrx, deepseek_ocr2, deepseek_v2 |
CI (Nvidia + AMD)Nvidia · ✅ No new failures 🎉👏 · ⚙️ Workflow · 📊 Dashboard Failures (2 pre-existing)Pre-existing failures (still failing) — 2 total: Same error (2): - blt: AMD · ✅ No new failures 🎉👏 · ⚙️ Workflow · 📊 Dashboard Failures (27 pre-existing)Pre-existing failures (still failing) — 27 total: Same error (27):
|
Follow-up to #50462 and #50916: migrate every tester still in
TESTERS_NOT_YET_STATIC(95 testers across 88 model test files) to literalsmall_config_overrides, with values computed from other values inget_small_config_defaults(). The exception list is now empty, soStaticRuntimeParityTestcovers every tester on the shared bases.Also makes hy_v4_vl's
vision_out_hidden_size,grid_hwandnum_image_patchesliterals (with their derivation in a comment) instead of computing them inget_small_config_defaults(), so a static reader sees them. Nothing constructs that tester with different sizes.What changed in the testers
kwargs.setdefault(...)and literalself.x = ...in__init__move intosmall_config_overrides; the__init__is removed wherever nothing else was left in it.def __init__(self, parent, batch_size=13, ...)) becomesmall_config_overrides; no caller passes positional arguments to any of them. gemma3n's text tester never calledsuper().__init__, so it declaresdefaults = {}like BERT does.out_hidden_size = hidden_size,max_source_positionsfromfeat_seq_length) are computed inget_small_config_defaults(), keeping the runtime precedence:values.setdefaultwhere a caller's value used to win, plain assignment where__init__set the value aftersuper().__init__().head_dim(16, derived from the shared defaults before the tester narrowedhidden_size), fun_asr_nano'sadaptor_intermediate_size(16 # 64 // 4) and nemotron_h_omni's audio layer count (the sharedset_omni_tester_defaults()helper is folded into each tester's dict).small_config_overridesintests/models(127) parses withast.literal_eval.Proof
setUp()builds and the config fromprepare_config_and_inputs_for_common()were snapshotted on943ef884e6(main) and on this branch: 95/95 identical, and no static/runtime mismatch.tests/utils/test_model_tester_defaults.py: 12 passed, with an emptyTESTERS_NOT_YET_STATIC. Putting a migrated tester back on the list makes it fail ("now match ... remove them from the list"), so the parity check does run.-k "config or common_attributes or test_model"excluding tensor/expert-parallel tests: all pass. inkling's run needsscipy.ruff checkandruff format --checkpass on the changed files;git diff --checkis clean.The values are now readable without importing the test modules (by transformers-mic, for instance). A few testers derive values in forms a static reader needs to evaluate (comprehensions,
len(), or settingkwargsbefore callingsuper(), such as llava_next and hunyuan_vl); those are correct at runtime and covered by the parity test.🤖 Generated with Claude Code