Skip to content

Commit

Permalink
fix: silence log for new epoch (it runs on every thread)
Browse files Browse the repository at this point in the history
  • Loading branch information
feffy380 committed Oct 16, 2024
1 parent 2500f5a commit c6b63b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/train_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,14 +703,14 @@ def set_caching_mode(self, mode):
def set_current_epoch(self, epoch):
if not self.current_epoch == epoch: # epochが切り替わったらバケツをシャッフルする
if epoch > self.current_epoch:
logger.info("epoch is incremented. current_epoch: {}, epoch: {}".format(self.current_epoch, epoch))
# logger.info("epoch is incremented. current_epoch: {}, epoch: {}".format(self.current_epoch, epoch))
num_epochs = epoch - self.current_epoch
for _ in range(num_epochs):
self.current_epoch += 1
self.shuffle_buckets()
# self.current_epoch seem to be set to 0 again in the next epoch. it may be caused by skipped_dataloader?
else:
logger.warning("epoch is not incremented. current_epoch: {}, epoch: {}".format(self.current_epoch, epoch))
# logger.warning("epoch is not incremented. current_epoch: {}, epoch: {}".format(self.current_epoch, epoch))
self.current_epoch = epoch

def set_current_step(self, step):
Expand Down

0 comments on commit c6b63b7

Please sign in to comment.