Unverified Commit 4c17c55c authored by Pasquale Minervini's avatar Pasquale Minervini Committed by GitHub
Browse files

`batch_size` with `auto` defaults to 1 if `No executable batch size found` (#1405)

Fixes https://github.com/EleutherAI/lm-evaluation-harness/issues/1323
parent 756eeb6f
......@@ -617,7 +617,13 @@ class HFLM(LM):
return batch_size
batch_size = forward_batch()
try:
batch_size = forward_batch()
except RuntimeError as e:
if "No executable batch size found" in str(e):
batch_size = 1
else:
raise
if self.world_size > 1:
# if multi-GPU, always take minimum over all selected batch sizes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment