diff --git a/train.py b/train.py index ebe6c2e8f5f9..b20b7dbb2dda 100644 --- a/train.py +++ b/train.py @@ -612,7 +612,7 @@ def main(opt, callbacks=Callbacks()): # Train mutation results = train(hyp.copy(), opt, device, callbacks) - + callbacks = Callbacks() # Write mutation results print_mutation(results, hyp.copy(), save_dir, opt.bucket) diff --git a/utils/loggers/__init__.py b/utils/loggers/__init__.py index 7679ee70f176..86ccf38443a9 100644 --- a/utils/loggers/__init__.py +++ b/utils/loggers/__init__.py @@ -159,10 +159,7 @@ def on_train_end(self, last, best, plots, epoch, results): wandb.log_artifact(str(best if best.exists() else last), type='model', name='run_' + self.wandb.wandb_run.id + '_model', aliases=['latest', 'best', 'stripped']) - self.wandb.finish_run() - else: - self.wandb.finish_run() - self.wandb = WandbLogger(self.opt) + self.wandb.finish_run() def on_params_update(self, params): # Update hyperparams or configs of the experiment