mirror of
https://github.com/karpathy/nanochat.git
synced 2025-12-06 04:12:13 +00:00
fix
This commit is contained in:
parent
c09b897601
commit
26b0941f75
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user