Skip to content

Commit

Permalink
feat: add check for existence of accelerator before waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
Luodian committed Sep 5, 2024
1 parent 5b310f4 commit e1df331
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lmms_eval/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,8 @@ def evaluate(
else:
results_dict = None

lm.accelerator.wait_for_everyone()
if hasattr(lm, "accelerator"):
lm.accelerator.wait_for_everyone()
return results_dict


Expand Down

0 comments on commit e1df331

Please sign in to comment.