Josh Veitch-Michaelis glenn-jocher commited on
Commit
19e28e3
1 Parent(s): 7af1b4c

Add `callbacks` to train function in W&B sweep (#4742)

Browse files

* 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 <[email protected]>

Files changed (1) hide show
  1. utils/loggers/wandb/sweep.py +2 -1
utils/loggers/wandb/sweep.py CHANGED
@@ -9,6 +9,7 @@ sys.path.append(FILE.parents[3].as_posix()) # add utils/ to path
9
  from train import train, parse_opt
10
  from utils.general import increment_path
11
  from utils.torch_utils import select_device
 
12
 
13
 
14
  def sweep():
@@ -26,7 +27,7 @@ def sweep():
26
  device = select_device(opt.device, batch_size=opt.batch_size)
27
 
28
  # train
29
- train(hyp_dict, opt, device)
30
 
31
 
32
  if __name__ == "__main__":
 
9
  from train import train, parse_opt
10
  from utils.general import increment_path
11
  from utils.torch_utils import select_device
12
+ from utils.callbacks import Callbacks
13
 
14
 
15
  def sweep():
 
27
  device = select_device(opt.device, batch_size=opt.batch_size)
28
 
29
  # train
30
+ train(hyp_dict, opt, device, callbacks=Callbacks())
31
 
32
 
33
  if __name__ == "__main__":