fix(load_ml): report liveness during training - #4682
Open
romain-intel wants to merge 1 commit into
Open
Conversation
…lled dead The component marks itself successful once per loop iteration, at the end - but a curriculum retrain is five passes of thirty epochs and routinely runs longer than the sixty minute window components.is_alive() allows between successes. Measured on a live system, all seven retrains in a day ran over: 63, 67, 69, 73, 78, 88 and 90 minutes, leaving the component reported dead for the last 3 to 30 minutes of each. is_all_alive() then fails, is_running() returns False, and the dashboard shows the whole of Predbat as "(unhealthy)" while nothing is actually wrong. Restarting the component appears to fix it because that resets the clock, which is exactly why this looked like a crash and stayed hidden - there is nothing in the log, because nothing failed. train() and train_curriculum() take an optional progress_callback, invoked once per epoch, and the component passes its own update_success_timestamp. On the observed hardware an epoch is around forty seconds, so the pulse has two orders of magnitude of headroom against the window. The hook is guarded: a progress callback must never be able to abort an hour of training. Both of _do_training's train_curriculum call sites are wired, and the test drives the real _do_training for is_initial True and False, asserting on every call rather than the last - with is_initial the initial curriculum is followed by a fine-tune pass, so recording only the most recent call would let an unwired first one hide behind a correct second. Verified by deleting each call site in turn and confirming the test fails. This is a separate fault from the log rotation race fixed earlier. That one killed the thread for good and left a traceback; this one leaves no trace and clears itself when training finishes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> (cherry picked from commit f046506219693059f20b8e279f35fa145ba22ab7)
Owner
|
Change looks fine, but its not hooked up to anything? |
Contributor
Author
|
Wdym? It passes the |
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.
The component marks itself successful once per loop iteration, at the end - but a curriculum retrain is five passes of thirty epochs and routinely runs longer than the sixty minute window components.is_alive() allows between successes. is_all_alive() then fails, is_running() returns False, and the dashboard shows the whole of Predbat as "(unhealthy)" while nothing is actually wrong.
Restarting the component appears to fix it because that resets the clock, which is exactly why this looked like a crash and stayed hidden - there is nothing in the log, because nothing failed.
train() and train_curriculum() take an optional progress_callback, invoked once per epoch, and the component passes its own update_success_timestamp. On the observed hardware an epoch is around forty seconds, so the pulse has two orders of magnitude of headroom against the window. The hook is guarded: a progress callback must never be able to abort an hour of training.
Both of _do_training's train_curriculum call sites are wired, and the test drives the real _do_training for is_initial True and False, asserting on every call rather than the last - with is_initial the initial curriculum is followed by a fine-tune pass, so recording only the most recent call would let an unwired first one hide behind a correct second. Verified by deleting each call site in turn and confirming the test fails.