-
Notifications
You must be signed in to change notification settings - Fork 86
Refactored training function. (#481) #693
base: master
Are you sure you want to change the base?
Conversation
89bea83
to
9a0e30f
Compare
04ed363
to
137af74
Compare
62c76ca
to
0c01215
Compare
This PR needs Approvals as follows.
Please choose reviewers and requet reviews! Click to see how to approve each reviewsYou can approve this PR by triggered comments as follows.
See all trigger commentsPlease replace [Target] to review target
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ed728
Thank you for this PR!!
Diff length is not problem in this PR.
In this PR, you created Trainer class and just move function code into the class.
I think after this PR, we will refactor start_training
huge function.
This is not obvious refactoring.
Do you have any plan to solve #481 ?
I think it's good to make agreement with Blueoil developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than small comments, LGTM.
|
||
self.validation_dataset = setup_dataset(self.config, "validation", self.rank, self.local_rank) | ||
print("validation dataset num:", self.validation_dataset.num_per_epoch) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this return statement, as it doesn't change behavior.
|
||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove these two lines also?
|
1 similar comment
|
What this patch does to fix the issue.
Splits the
start_training
function into functions in a class. More readability changes will be added later. This commit just moves functionality around. The functions was very large, so a smaller commit than this was not possible. This commit only moves stuff around for ease of reviewing.Link to any relevant issues or pull requests.
Based on #481 .
More PRs will be added after this.
Testing.
Manual and CI.