HF RL Explorer

Task: Implement Early Stopping for PyTorch Training

Task: Implement Early Stopping for PyTorch Training: a task in Terminal-Lego-15k (Harbor dataset). You need to implement a correct early stopping mechanism for a PyTorch neural network training loop. The original implementation has a bug: the counter variable is reset to 0 every time the function…

The task

You need to implement a correct early stopping mechanism for a PyTorch neural network training loop. The original implementation has a bug: the `counter` variable is reset to 0 every time the function is called, so it never accumulates across epochs and can never reach the `tolerance` threshold.

Part of PrimeIntellect/Terminal-Lego-15k.