Skip to content

Add dedicated GraniteMoe adapter tests (#1302)#1524

Merged
jlarson4 merged 1 commit into
TransformerLensOrg:devfrom
delaidam:test/granite-moe-adapter-tests
Jul 20, 2026
Merged

Add dedicated GraniteMoe adapter tests (#1302)#1524
jlarson4 merged 1 commit into
TransformerLensOrg:devfrom
delaidam:test/granite-moe-adapter-tests

Conversation

@delaidam

Copy link
Copy Markdown

Closes part of #1302.

granite_moe already had substantive test coverage, but it was
embedded inside test_granite_adapter.py rather than living in its
own file — inconsistent with every other architecture from #1302
(including granite_moe_hybrid), each of which gets a dedicated
test_<name>_adapter.py.

This moves that coverage into test_granite_moe_adapter.py and adds
the one piece that was missing: an explicit config-flag test class.
GraniteMoeArchitectureAdapter doesn't override config setup, so it
inherits dense Granite's flags, but nothing asserted that directly
before.

test_granite_adapter.py goes back to covering only
GraniteArchitectureAdapter, matching its own docstring.

Verified:

  • Both files pass (36/36 tests).
  • Confirmed the new tests actually catch a regression: temporarily
    broke granite_moe.py's MoE bridge name and watched
    test_moe_hf_path fail, then reverted.
  • Full tests/unit/model_bridge/supported_architectures/ suite passes
    (2070/2070) with these changes in place.

granite_moe had substantive test coverage, but embedded inside
test_granite_adapter.py rather than in its own file — inconsistent
with every other architecture listed in TransformerLensOrg#1302 (including
granite_moe_hybrid), which each get a dedicated test_<name>_adapter.py.
Moves that coverage into test_granite_moe_adapter.py and adds the one
piece that was missing: an explicit config-flag test class (GraniteMoe
doesn't override config setup, so it inherits dense Granite's flags,
but nothing asserted that directly before).

test_granite_adapter.py goes back to covering only
GraniteArchitectureAdapter, matching its own docstring.
@jlarson4
jlarson4 merged commit a669676 into TransformerLensOrg:dev Jul 20, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants