neuraloperator icon indicating copy to clipboard operation
neuraloperator copied to clipboard

(fix) Allow calling `Trainer.train_one_epoch` before `Trainer.train` has been called

Open dhpitt opened this issue 1 year ago • 5 comments

Fixes #537

dhpitt avatar Feb 12 '25 18:02 dhpitt

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?

JeanKossaifi avatar Feb 12 '25 18:02 JeanKossaifi

The potential use case could be that a user wants to run some customized callback function after each epoch.

ziyiyin97 avatar Feb 12 '25 18:02 ziyiyin97

I see it is still marked as draft, did you plan to add more @dhpitt ?

JeanKossaifi avatar Sep 09 '25 10:09 JeanKossaifi

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: @.***>

dhpitt avatar Sep 09 '25 10:09 dhpitt

I agree. We can close this and open an issue.

JeanKossaifi avatar Sep 10 '25 09:09 JeanKossaifi