mirror of
https://github.com/karpathy/nanochat.git
synced 2026-02-10 04:29:50 +00:00
Add validation in Task.__len__() to ensure stop parameter does not exceed the actual dataset size. This prevents IndexError crashes during training when invalid stop values are provided. The validation is centralized in the base Task class and preserves the original lazy evaluation behavior - num_examples() is only called when needed (for validation when stop is provided, or for default value when stop is None). Fixes issue where training would crash with IndexError when iterating over Task instances with stop > dataset_size. |
||
|---|---|---|
| .. | ||
| arc.py | ||
| common.py | ||
| customjson.py | ||
| gsm8k.py | ||
| humaneval.py | ||
| mmlu.py | ||
| smoltalk.py | ||
| spellingbee.py | ||