This commit is contained in:
Sofie Van Landeghem 2025-11-22 22:51:42 +01:00 committed by GitHub
parent c09b897601
commit 26b0941f75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -39,12 +39,12 @@ class Task:
start = self.start start = self.start
num_ex = self.num_examples() num_ex = self.num_examples()
if self.stop is not None and self.stop > num_ex: if self.stop is not None and self.stop > num_ex:
# Warn once, then cap stop # Warn once, then cap stop
logger.warning( logger.warning(
f"Stop parameter ({self.stop}) exceeds dataset size ({num_ex}). " f"Stop parameter ({self.stop}) exceeds dataset size ({num_ex}). "
f"Using {num_ex} examples instead." f"Using {num_ex} examples instead."
) )
self.stop = num_ex self.stop = num_ex
stop = num_ex if self.stop is None else self.stop stop = num_ex if self.stop is None else self.stop
step = self.step step = self.step
span = stop - start span = stop - start