Skip to content

Commit f9176c5

Browse files
committed
fix: fmt + lint
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
1 parent 07d38b0 commit f9176c5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

plugins/accelerated-moe/src/fms_acceleration_moe/utils/scattermoe_prepare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def prepare_scattermoe(
255255
module_name,
256256
router_name,
257257
"|".join(expert_name),
258-
lora_start=lora
258+
lora_start=lora,
259259
target_modules=lora_config.target_modules,
260260
)
261261

plugins/accelerated-moe/src/fms_acceleration_moe/utils/scattermoe_state_dict.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def get_checkpoint_meta_from_sharded_safetensor(
8888
router_name: str = "gate", # e.g., named "gate" within block_sparse_moe
8989
expert_name: str = "experts", # e.g., named "experts" within block_sparse_moe
9090
expert_map: Dict = None, # map -> [w1,w2,w3]
91-
lora_start: bool = False, # if lora is detected in prepare_scattermoe.py
91+
lora_start: bool = False, # if lora is detected in prepare_scattermoe.py
9292
lora_utils: bool = False, # if lora is detected in checkpoint_utils.py
9393
target_modules: Dict = None, # target modules from prepare_scattermoe.py
9494
) -> Dict[str, List[Tuple]]:
@@ -197,10 +197,8 @@ def _insert(L: List, i: int, v):
197197
elif not lora_utils and not lora_start:
198198
for mod in expert_map.get(m.group(1), expert_map.get(m.group(3))):
199199
_insert(_map[f"{mod}.weight"], index, (k, stfile))
200-
201-
assert mod is not None, f"cannot map '{rel_k}'"
202200

203-
201+
assert mod is not None, f"cannot map '{rel_k}'"
204202

205203
if len(_map) == 0:
206204
raise ValueError(

0 commit comments

Comments
 (0)