Fix W&B project name separator compatibility (#17627)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
pull/17631/head^2
Kyre 6 days ago committed by GitHub
parent dc9b99214f
commit f3241eb676
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      ultralytics/utils/callbacks/wb.py

@ -109,7 +109,12 @@ def _log_plots(plots, step):
def on_pretrain_routine_start(trainer):
"""Initiate and start project if module is present."""
wb.run or wb.init(project=trainer.args.project or "Ultralytics", name=trainer.args.name, config=vars(trainer.args))
if not wb.run:
wb.init(
project=str(trainer.args.project).replace("/", "-") if trainer.args.project else "Ultralytics",
name=str(trainer.args.name).replace("/", "-"),
config=vars(trainer.args),
)
def on_fit_epoch_end(trainer):

Loading…
Cancel
Save