From 51f7750aada63791c31c56c55685035f80be4daf Mon Sep 17 00:00:00 2001 From: Ayush Chaurasia Date: Sat, 12 Feb 2022 17:33:09 +0530 Subject: [PATCH] W&B: Improve resume stability (#6611) * log best.pt metrics at train end * update * Update __init__.py * flush callbacks when using evolve * remember batch size on resuming * Update train.py * improve stability of resume Co-authored-by: Glenn Jocher --- utils/loggers/wandb/wandb_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/loggers/wandb/wandb_utils.py b/utils/loggers/wandb/wandb_utils.py index 3c6b65723325..6fe5dd71bc03 100644 --- a/utils/loggers/wandb/wandb_utils.py +++ b/utils/loggers/wandb/wandb_utils.py @@ -225,9 +225,9 @@ def setup_training(self, opt): if modeldir: self.weights = Path(modeldir) / "last.pt" config = self.wandb_run.config - opt.weights, opt.save_period, opt.batch_size, opt.bbox_interval, opt.epochs, opt.hyp = str( - self.weights), config.save_period, config.batch_size, config.bbox_interval, config.epochs, \ - config.hyp + opt.weights, opt.save_period, opt.batch_size, opt.bbox_interval, opt.epochs, opt.hyp, opt.imgsz = str( + self.weights), config.save_period, config.batch_size, config.bbox_interval, config.epochs,\ + config.hyp, config.imgsz data_dict = self.data_dict if self.val_artifact is None: # If --upload_dataset is set, use the existing artifact, don't download self.train_artifact_path, self.train_artifact = self.download_dataset_artifact(data_dict.get('train'),