(fix) Allow calling `Trainer.train_one_epoch` before `Trainer.train` has been called
Fixes #537
What would be the usecase? Do we want users to call that directly instead of letting the trainer do it? If so do we need the class really? Might just be a collection of functions/or some could be classmethods.
I do like the clarity of passing model, opt and scheduler explicitly - should we add it everywhere?
The potential use case could be that a user wants to run some customized callback function after each epoch.
I see it is still marked as draft, did you plan to add more @dhpitt ?
I think making a fully stateless trainer would be a better use of time if we're going to change the Trainer interface significantly. What do you think?
On Tue, Sep 9, 2025 at 6:06 AM Jean Kossaifi @.***> wrote:
JeanKossaifi left a comment (neuraloperator/neuraloperator#539) https://github.com/neuraloperator/neuraloperator/pull/539#issuecomment-3269925249
I see it is still marked as draft, did you plan to add more @dhpitt https://github.com/dhpitt ?
— Reply to this email directly, view it on GitHub https://github.com/neuraloperator/neuraloperator/pull/539#issuecomment-3269925249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWQJOH6XS7ZBUJ3SRVWM6L3R2RDZAVCNFSM6AAAAABXAID2Q2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENRZHEZDKMRUHE . You are receiving this because you were mentioned.Message ID: @.***>
I agree. We can close this and open an issue.