Repository navigation
Release 0.3.0: pluggable training schedulers - #28
Merged
Merged
Conversation
Add a Scheduler abstraction that decides which training unit (timestep or batch) each inner iteration of DerivativeTraining and BatchingStrategy trains on, with 14 implementations ranging from Sequential and Shuffled to loss-driven reruns (WorstLoss, WeightedWorst, UCB, ...) and the gradient-pooling TemporalWindow. Breaking: - BatchingStrategy, SingleShooting and MultipleShooting default `sense` to InterpolatingAdjoint(checkpointing=false), so fixed-step solvers such as Euler work out of the box. This stores the full forward trajectory and raises adjoint memory use on long adaptive solves; pass an explicit `sense` with checkpointing=true to opt back in. - The df_step checkpoint table gains an `interval_idx` column. Older checkpoints are migrated on load; checkpoints written by 0.3 do not load in 0.2. - `loss_function` must be :mse or :mae and is validated at construction. Fixes: - GPU neighbor search now uses the Octopus octree, with gradients from Octopus.build_edges_diff. This replaces a hand-written GPU rrule whose sign was flipped, which corrupted GPU ODE and batching gradients, and roughly halves GPU memory for the search. - data_meanstd divided by the total element count instead of the per-dimension count, distorting offline mean/std statistics. Regenerate meta.json statistics computed with earlier versions. - WeightedWorst-style sampling no longer returns the first unit instead of the worst one at very low temperature (Float64 overflow). Additions: - DerivativeTraining(; scheduler, loss_function) and BatchingStrategy(...; scheduler). - extrapolate_network(...; extrapolate_factor) rolls each trajectory out to a multiple of its own ground-truth duration. Tests, docs and CI: - Contract tests for all schedulers; the DerivativeTraining convergence test is seeded and tolerates float-level noise instead of failing on it. - All schedulers are documented in the API reference. - CI and coverage badges; formatting runs on pull requests only; the documentation workflow is started manually.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
GraphNetSim cannot load on Julia 1.13: Reactant only supports 1.13 from 0.2.283 on, and every such version needs CUDA/cuDNN versions that GraphNetCore 0.4 does not allow. Restrict the julia compat to ~1.12 so Pkg refuses to install it on 1.13, drop the 1.13 CI job, and state the supported version in the README.
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.
Add a Scheduler abstraction that decides which training unit (timestep or batch) each inner iteration of DerivativeTraining and BatchingStrategy trains on, with 14 implementations ranging from Sequential and Shuffled to loss-driven reruns (WorstLoss, WeightedWorst, UCB, ...) and the gradient-pooling TemporalWindow.
Breaking:
senseto InterpolatingAdjoint(checkpointing=false), so fixed-step solvers such as Euler work out of the box. This stores the full forward trajectory and raises adjoint memory use on long adaptive solves; pass an explicitsensewith checkpointing=true to opt back in.interval_idxcolumn. Older checkpoints are migrated on load; checkpoints written by 0.3 do not load in 0.2.loss_functionmust be :mse or :mae and is validated at construction.Fixes:
Additions:
Tests, docs and CI: