Commit Graph

9 Commits

Author SHA1 Message Date
Pyry Takala
28fd25b2bc
Merge 26b0941f75 into 8630d32be4 2026-01-26 21:56:33 -08:00
Sofie Van Landeghem
26b0941f75
fix 2025-11-22 22:51:42 +01:00
Sofie Van Landeghem
c09b897601
further cleanup 2025-11-22 22:50:34 +01:00
Sofie Van Landeghem
df9a644e24
make code bit more succinct 2025-11-22 22:48:55 +01:00
Pyry Takala
a33d04dca1 Cap stop parameter and warn once when it exceeds dataset size 2025-11-21 20:51:46 +00:00
Pyry Takala
85e49943ed Gracefully handle stop > dataset_size with warning 2025-11-21 20:04:33 +00:00
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
Eric Silberstein
024781f9df fixing two typos in comments 2025-11-19 15:12:53 -05:00
karpathy
3a5e0bc50b initial commit 2025-10-13 06:49:24 -07:00