This pull request refactors the training loop in the main.py file into a class called Trainer. It also updates the api.py file to use the Trainer class for loading and training the model. Additionally, it reorganizes the imports in both files for better readability.
Summary
Refactored the training loop in main.py into a Trainer class
Updated api.py to use the Trainer class for loading and training the model
Reorganized imports in both files for better readability
Description
This pull request refactors the training loop in the
main.py
file into a class calledTrainer
. It also updates theapi.py
file to use theTrainer
class for loading and training the model. Additionally, it reorganizes the imports in both files for better readability.Summary
main.py
into aTrainer
classapi.py
to use theTrainer
class for loading and training the modelFixes #6.
🎉 Latest improvements to Sweep:
rope
library to refactor Python! Check out Large Language Models are Bad at Refactoring Code. To have Sweep refactor your code, trysweep: Refactor <your_file>.py
!💡 To get Sweep to edit this pull request, you can: