[None][fix] Fix CuteDslFusedMoE.load_weights signature to accept allow_partial_loading#12690
[None][fix] Fix CuteDslFusedMoE.load_weights signature to accept allow_partial_loading#12690tianyuz-nv wants to merge 2 commits intoNVIDIA:mainfrom
Conversation
…w_partial_loading Signed-off-by: tianyuz-nv <tianyuz@nvidia.com>
e836874 to
26653d5
Compare
|
/bot run --disable-fail-fast |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR updates the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
PR_Github #41426 [ run ] triggered by Bot. Commit: |
|
PR_Github #41426 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #41472 [ run ] triggered by Bot. Commit: |
|
PR_Github #41472 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #41539 [ run ] triggered by Bot. Commit: |
|
PR_Github #41539 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #41569 [ run ] triggered by Bot. Commit: |
|
PR_Github #41569 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #41590 [ run ] triggered by Bot. Commit: |
Problem
PR #12136 added a
CuteDslFusedMoE.load_weights()override with a signaturethat did not match the
MoEbase class interface — it was missing theallow_partial_loadingparameter.This causes a
TypeErrorwhen_load_weights_implinmodeling_utils.pycalls
module.load_weights(weights=..., allow_partial_loading=...)via theparams_mapcode path (e.g., Qwen3 + CuteDSL backend):TypeError: CuteDslFusedMoE.load_weights() got an unexpected keyword argument 'allow_partial_loading'
Fix
CuteDslFusedMoE.load_weightssignature with the base classMoE.load_weights(weights: List[Dict], allow_partial_loading: bool = False)allow_partial_loadingthrough tosuper().load_weights()Test
Added
test_cutedsl_load_weights_signature_matches_baseintests/unittest/_torch/thop/parallel/test_cute_dsl_moe.pyto verifyCuteDslFusedMoE.load_weightsaccepts bothweightsandallow_partial_loadingparameters.Summary by CodeRabbit
New Features
Bug Fixes
Tests