Fix: wandb reporting error if no positive examples (#17544)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
pull/17556/head^2
Jamil Dhanani 1 week ago committed by GitHub
parent a132920476
commit 1790ca0f88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      ultralytics/utils/callbacks/wb.py

@ -138,7 +138,7 @@ def on_train_end(trainer):
art.add_file(trainer.best)
wb.run.log_artifact(art, aliases=["best"])
# Check if we actually have plots to save
if trainer.args.plots:
if trainer.args.plots and hasattr(trainer.validator.metrics, "curves_results"):
for curve_name, curve_values in zip(trainer.validator.metrics.curves, trainer.validator.metrics.curves_results):
x, y, x_title, y_title = curve_values
_plot_curve(

Loading…
Cancel
Save