Skip to content

Release 0.3.0: pluggable training schedulers - #28

Merged
JoKircher merged 2 commits into
mainfrom
release-0.3.0
Oct 20, 2026
Merged

JoKircher merged 2 commits into
mainfrom
release-0.3.0

Conversation

@JoKircher

Copy link
Copy Markdown
Member

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.

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.
@codecov-commenter

Copy link
Copy Markdown

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.
@JoKircher
JoKircher merged commit a6bae73 into main Oct 20, 2026
2 checks passed
@JoKircher
JoKircher deleted the release-0.3.0 branch October 20, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants