make code bit more succinct

This commit is contained in:
Sofie Van Landeghem 2025-11-22 22:48:55 +01:00 committed by GitHub
parent a33d04dca1
commit df9a644e24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,9 +46,7 @@ class Task:
f"Using {num_ex} examples instead."
)
self.stop = num_ex
stop = self.stop
else:
stop = self.num_examples()
stop = self.num_examples() if self.stop is None else self.stop
step = self.step
span = stop - start
num = (span + step - 1) // step # ceil_div(span, step)