From 8cb79360abf09077c49f1235cda7b54346386c8a Mon Sep 17 00:00:00 2001 From: Josh Veitch-Michaelis Date: Sat, 11 Sep 2021 02:28:52 +1200 Subject: [PATCH] Add `callbacks` to train function in W&B sweep (#4742) * add callbacks to train function in wandb sweep Fix following https://github.com/ultralytics/yolov5/pull/4688 which modified the function signature to `train` * Cleanup Co-authored-by: Glenn Jocher --- utils/loggers/wandb/sweep.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/loggers/wandb/sweep.py b/utils/loggers/wandb/sweep.py index 2dcda508eb50..0ca704dd28dd 100644 --- a/utils/loggers/wandb/sweep.py +++ b/utils/loggers/wandb/sweep.py @@ -9,6 +9,7 @@ from train import train, parse_opt from utils.general import increment_path from utils.torch_utils import select_device +from utils.callbacks import Callbacks def sweep(): @@ -26,7 +27,7 @@ def sweep(): device = select_device(opt.device, batch_size=opt.batch_size) # train - train(hyp_dict, opt, device) + train(hyp_dict, opt, device, callbacks=Callbacks()) if __name__ == "__main__":