Skip to content

Commit 3ecdde7

Browse files
committed
feat: Fix incorrect LM object check in evaluator
The code changes in this commit fix a bug in the evaluator where the check for the LM object was incorrectly performed on the model object instead. This resulted in the LM object not being properly removed when it should have been. The fix ensures that the check is performed on the correct object, lm, and removes the LM object if it is not an instance of LM. Remove not used txt writer
1 parent 764d6bf commit 3ecdde7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lmms_eval/evaluator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ def evaluate(
610610
if hasattr(lm, "accelerator"):
611611
lm.accelerator.wait_for_everyone()
612612

613-
if not isinstance(model, lm_eval.api.model.LM):
613+
if not isinstance(lm, lm_eval.api.model.LM):
614614
del lm
615615

616616
return results_dict

0 commit comments

Comments
 (0)