Skip to content

Commit ad06609

Browse files
authored
Fix variable name in NotImplementedError message (#1637)
self.score_function should be self.score_func
1 parent 030879f commit ad06609

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchtitan/models/moe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def forward(
216216
elif self.score_func == "softmax":
217217
scores = F.softmax(scores.to(torch.float32), dim=1)
218218
else:
219-
raise NotImplementedError(f"Unknown score function {self.score_function}")
219+
raise NotImplementedError(f"Unknown score function {self.score_func}")
220220

221221
# top scores shape (bs*slen, top_k)
222222
# NOTE: The expert_bias is only used for routing. The gating value

0 commit comments

Comments
 (0)