Skip to content

Commit 2f7df93

Browse files
committed
fix: raise error if no model name
Signed-off-by: Will Johnson <[email protected]>
1 parent 17d0d6c commit 2f7df93

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/accelerated-moe/src/fms_acceleration_moe/framework_plugin_scattermoe.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ def augmentation(
6767
world_size = torch.distributed.get_world_size()
6868
rank = torch.distributed.get_rank()
6969

70+
if not hasattr(model.config, "name_or_path") or not model.config.name_or_path:
71+
raise ValueError(
72+
"The model configuration is missing the 'name_or_path' attribute."
73+
)
74+
7075
model_name = model.config.name_or_path
7176

7277
self._moe_component_module_names = prepare_scattermoe(

0 commit comments

Comments
 (0)