Repository navigation
Fix training CLI checkpoint scheduling using actual action steps - #6
Merged
Merged
Conversation
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 public training CLI crashed after its first episode: the default 10,000-step save interval divided by the 23,400-step episode cap became zero. It also derived the training budget from the episode cap, so short CSVs did not execute the requested number of transitions.
Count actual training action steps, replay complete episodes until the budget is reached, and cap the final episode without changing its terminal transition flag. Evaluate/save once at episode boundaries crossing step thresholds. Honor training.save_frequency when supplied, otherwise the existing agent.save_frequency; reject nonpositive/noninteger schedules before logging or experiment tracking. Document interval units, boundary behavior and current resume/held-out-data limitations.
Validation on source tree 472925e7b9c9ba4e03600bdf3861e23e62b2e2a1: all 94 tests pass. New real subprocess tests run the public train CLI with small CPU TD3 networks, verify actual optimizer iterations and checkpoint counts across short CSVs, overrides, truncated budgets and long intervals, load saved models, and run the public evaluation CLI. Tests also verify terminal masking on genuine exhaustion versus budget truncation and rejection of invalid settings. Python compilation and git diff --check pass.
Reproduced baseline failure on main 81752df before this change. Fixtures are explicit software events, not market-history/performance evidence. No live financial calls; checkpoint replay/target/RNG restoration remains outside scope. This support slice preserves the prior LOB, Bellman, ledger and CSV replay implementations.