Add default-off classify early stopping - #132
Merged
Merged
Conversation
Optional patience stops only after a scored epoch records any strict improvement, and epoch progress plus the completion receipt gain observational wall-clock fields.
Optional patience stops only after a scored epoch records any strict improvement, and epoch progress plus the completion receipt gain observational wall-clock fields.
Optional patience stops only after a scored epoch records any strict improvement, and epoch progress plus the completion receipt gain observational wall-clock fields.
Optional patience stops only after a scored epoch records any strict improvement, and epoch progress plus the completion receipt gain observational wall-clock fields.
Optional patience stops only after a scored epoch records any strict improvement, and epoch progress plus the completion receipt gain observational wall-clock fields.
Optional patience stops only after a scored epoch records any strict improvement, and epoch progress plus the completion receipt gain observational wall-clock fields.
Optional patience stops only after a scored epoch records any strict improvement, and epoch progress plus the completion receipt gain observational wall-clock fields.
Optional patience stops only after a scored epoch records any strict improvement, and epoch progress plus the completion receipt gain observational wall-clock fields.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Optional, default-off early stopping for the classify training loop.
HYPERLEX_TRAIN_EPOCHSstays the max-epoch cap and does not turn this on.HYPERLEX_EARLY_STOP=1,HYPERLEX_EARLY_STOP_PATIENCE, andHYPERLEX_EARLY_STOP_MIN_EPOCHS.HLX_SELECT_METRIC=classify_macro_f1_nonnone. Negative patience, invalid minimum epochs, and other selection metrics fail before the optimizer is constructed.epoch_index - best_epoch >= patienceand at leastminimum_epochsepochs have been scored. Ties keep the earlier checkpoint and consume patience.epoch-progress.jsonlrow gains observational seconds, rounded withround()to 6 decimal places:epoch_wallclock_secondsandtraining_elapsed_seconds. They do not affect selection or stopping.train-receipt.jsonrecordsstop_reason(max_epochsorearly_stopping) andtraining_elapsed_seconds. A failed loop still raises and does not write that completion receipt.Tests
Focused tests:
tests/shadow/test_hyperlexical_early_stop.py(24 passed) on Python 3.10.21, 3.11.16, and 3.12.3, using an injected monotonic clock and no sleeps.Full
HYPERLEX_OFFLINE=1 HYPERLEX_NO_RATE_LIMIT=1 PYTHONPATH=src python3 -m pytest -q:This does not seal an experiment, allocate a reserve, launch training, score a checkpoint, or move BEST. Do not merge from this description alone.