Skip to content

Commit aa7a0e9

Browse files
authored
Update on_train_end callback (#7716)
1 parent 1d0a094 commit aa7a0e9

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

train.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ def train(hyp, opt, device, callbacks): # hyp is path/to/hyp.yaml or hyp dictio
466466
callbacks.run('on_fit_epoch_end', list(mloss) + list(results) + lr, epoch, best_fitness, fi)
467467

468468
callbacks.run('on_train_end', last, best, plots, epoch, results)
469-
LOGGER.info(f"Results saved to {colorstr('bold', save_dir)}")
470469

471470
torch.cuda.empty_cache()
472471
return results

utils/loggers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ def on_train_end(self, last, best, plots, epoch, results):
164164
plot_results(file=self.save_dir / 'results.csv') # save results.png
165165
files = ['results.png', 'confusion_matrix.png', *(f'{x}_curve.png' for x in ('F1', 'PR', 'P', 'R'))]
166166
files = [(self.save_dir / f) for f in files if (self.save_dir / f).exists()] # filter
167+
self.logger.info(f"Results saved to {colorstr('bold', self.save_dir)}")
167168

168169
if self.tb:
169170
for f in files:

0 commit comments

Comments
 (0)