Skip to content

Commit

Permalink
W&B: Log best results after training ends (ultralytics#6120)
Browse files Browse the repository at this point in the history
* log best.pt metrics at train end

* update

* Update __init__.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
AyushExel and glenn-jocher committed Dec 30, 2021
1 parent 09232e0 commit 4e1a98d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/loggers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def on_train_end(self, last, best, plots, epoch, results):
self.tb.add_image(f.stem, cv2.imread(str(f))[..., ::-1], epoch, dataformats='HWC')

if self.wandb:
self.wandb.log({k: v for k, v in zip(self.keys[3:10], results)}) # log best.pt val results
self.wandb.log({"Results": [wandb.Image(str(f), caption=f.name) for f in files]})
# Calling wandb.log. TODO: Refactor this into WandbLogger.log_model
if not self.opt.evolve:
Expand Down

0 comments on commit 4e1a98d

Please sign in to comment.