Have `train!` record, for inclusion in output, a history of the public state of every control
Maintainers usually reply within 1 day
@ablaom is already working on this.
Since Oct 7, 2026.
Assessment
This issue has not been assessed yet.
Description
I propose some enhancements to address two main shortcomings of IterationControl.jl, mostly based on working on tutorials for MLJIteration.jl (which wraps MLJ models in the controls provided by IterationControl.jl):
-
While possible in practice, it is rather complicated to do things like: (i) Get a history of losses (or training losses) for training over multiple iterations (see #47); and (i) Set up a callback to record, say, evolution of some learned parameters. In both cases, you have to define and initialise containers to store the relevant trace, and also to arrange the relevant callback control to write to that container as training proceeds. When you repeat the experiment, you may need to flush the trace containers. This is inconvenient.
-
The internal state of a control is currently considered private API and the only interface point is for accessing what, from the final state, is returned in the "report" output by "train!". This seems unnecessarily opaque.
-
The "report" returned by "train!" is quite hard to grok, without delving into docs or scratching your head.
I propose:
-
Introduce a new method
public_state(control, state)that exposes everything aboutstatethat might be useful to know at every control cycle, in a human readable form (named tuple, say) -
By default, have
train!record a complete history of the public state of each control, exposed in the report, with acompact=trueoption to just record final state (for the atypical case fallbacks are exposing large objects as part of state) -
Make improvements to the structure and display of the report to make access more intuitive.
Among other things, these changes would likely address #62 and #47.
These changes would be necessarily breaking, although the logic of controls themselves would not change much, if at all.
Some steps required are:
- Introduce
public_statethe more primitive level ofEarlyStopping.jl(a dep of IterationControl.jl).
- Dominant language
- Julia
- Stars
- 25
- Forks
- 1
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 6
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaAI/IterationControl.jl
-
Add an `IterationControl.warmup(control)` wrapper for controlsMay be free again @aviralgarg05 claimed this 11 days ago, and no pull request is open. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 30/100
JuliaAI/IterationControl.jl#76 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
JuliaAI/IterationControl.jl#63 · 1 comment ·
Maintainers usually reply within 1 day
-
next breaking release
Difficulty 4/5 3-5 days Newbie friendliness 35/100
JuliaAI/IterationControl.jl#62 ·
Maintainers usually reply within 1 day
-
Remove unnecessary restriction that a callback function `<:Function`. That is, allow any callable.Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
JuliaAI/IterationControl.jl#59 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
JuliaAI/IterationControl.jl#58 · 1 comment ·
Maintainers usually reply within 1 day
All issues in JuliaAI/IterationControl.jl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Sienna-Platform/PowerSimulations.jl#1737 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
FluxML/Optimisers.jl#254 ·
-
Minor: floodplain warning percentage, scalar output error message and a never-true identity checkOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaAI/MLJTransforms.jl#101 ·
Maintainers usually reply within 1 day
-
@contents blocks fail to render on Julia 1.14Possibly taken @sbfnk claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LuxDL/DocumenterVitepress.jl#410 ·