-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Refactoring] Training functions and TrainConfig can be made more modular #570
Comments
Hey @debrevitatevitae , Thanks for raising this. For the refactoring, I had a few ideas and suggestions.
The simple outline of the train function would look something like this
I had two thoughts where I needed inputs though: Q2: Do we need the separate functions - train_with_grad and train_without_grad? Can we have a single Train (function/class) - that can be used for either based on a user defined argument? So, do we need the trainer to be a function and do we need separate functions for train_with_grand/train_without_grad? Let me know what you think. Once these ideas are refined - I will start working on a PR for this. |
Describe the feature
Refactoring the training system (training functions and training configuration) in more internal classes or functions.
It should be implemented because
Currently, there are implementation and readability problems about training functions and
TrainConfig
train_grad
counts more than 360 lines of code!). Therefore, on one hand, they have too many responsibilities, which makes them hard to maintain and extend. On the other hand they are hard to read.TrainConfig
unloads too much responsibility to the__post_init__
, which causes unwanted behavior such as this one.Modularization and responsibility separation will help in the readability, maintenance and extensibility of the training system
Additional context
No response
Would you like to work on this issue?
None
The text was updated successfully, but these errors were encountered: