mirror of
https://github.com/karpathy/nanochat.git
synced 2025-12-06 04:12:13 +00:00
Compare commits
3 Commits
e363ff8332
...
99278a6e41
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99278a6e41 | ||
|
|
a33d04dca1 | ||
|
|
85e49943ed |
|
|
@ -6,6 +6,9 @@ Example tasks: MMLU, ARC-Easy, ARC-Challenge, GSM8K, HumanEval, SmolTalk.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
import logging
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
class Task:
|
class Task:
|
||||||
"""
|
"""
|
||||||
|
|
@ -37,10 +40,12 @@ class Task:
|
||||||
if self.stop is not None:
|
if self.stop is not None:
|
||||||
num_ex = self.num_examples()
|
num_ex = self.num_examples()
|
||||||
if self.stop > num_ex:
|
if self.stop > num_ex:
|
||||||
raise ValueError(
|
# Warn once, then cap stop
|
||||||
|
logger.warning(
|
||||||
f"Stop parameter ({self.stop}) exceeds dataset size ({num_ex}). "
|
f"Stop parameter ({self.stop}) exceeds dataset size ({num_ex}). "
|
||||||
f"Please use stop <= {num_ex} or remove the stop parameter to use the full dataset."
|
f"Using {num_ex} examples instead."
|
||||||
)
|
)
|
||||||
|
self.stop = num_ex
|
||||||
stop = self.stop
|
stop = self.stop
|
||||||
else:
|
else:
|
||||||
stop = self.num_examples()
|
stop = self.num_examples()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user