nanochat/tasks
Pyry Takala cd782a1977 Fix: Validate stop parameter against dataset size
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.
2025-11-20 04:18:42 +00:00
..
arc.py initial commit 2025-10-13 06:49:24 -07:00
common.py Fix: Validate stop parameter against dataset size 2025-11-20 04:18:42 +00:00
customjson.py add explicit UTF-8 encoding 2025-11-03 21:27:12 +01:00
gsm8k.py initial commit 2025-10-13 06:49:24 -07:00
humaneval.py initial commit 2025-10-13 06:49:24 -07:00
mmlu.py initial commit 2025-10-13 06:49:24 -07:00
smoltalk.py initial commit 2025-10-13 06:49:24 -07:00
spellingbee.py add explicit UTF-8 encoding 2025-11-03 21:27:12 +01:00