allegroai / clearml

ClearML - Auto-Magical CI/CD to streamline your AI workload. Experiment Management, Data Management, Pipeline, Orchestration, Scheduling & Serving in one MLOps/LLMOps solution

Home Page:https://clear.ml/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plots are logged twice

chmjelek opened this issue · comments

Describe the bug

YOLOv8 training plots are logged twice.

obraz

To reproduce

from clearml import Task
from ultralytics import settings, YOLO


task = Task.init(
    project_name="Plots are logged twice",
    task_name="to_reproduce",
    auto_connect_frameworks={"pytorch": False}
)
params = {
    "epochs": 1,
    "imgsz": 320
}
task.connect(params)
task.execute_remotely()

settings.update({"clearml": False})
model = YOLO("yolov8n.pt")
results = model.train(data="coco128.yaml", **params)

I'm running

  • Task.init(auto_connect_frameworks={"pytorch": False}) - I do not want output model in artifacts
  • settings.update({"clearml": False}) since I do not want to log YOLO hyperparameters
    • using 'tensorboard': {'report_hparams': False} does not seem to have any effect

Expected behaviour

Plots should be logged once.

Environment

  • Server type self hosted
  • ClearML SDK Version 1.13.2
  • ClearML Server Version WebApp: 1.13.0-414 • Server: 1.13.0-414 • API: 2.27
  • Python Version 3.8
  • OS Windows

Doesn't YOLO feature a built-in ClearML integration that reports metrics automatically if the library is installed ? Pretty sure it is also present in YOLOv8 and that might be the source of your issue https://docs.ultralytics.com/yolov5/tutorials/clearml_logging_integration/

Yes, there is an automatic ClearML logging build in YOLOv8 docs.

That is why I have used settings.update({"clearml": False}) to disable it.

In ClearML framework that logs plots from training is matplotlib I think, because when I use Task.init(auto_connect_frameworks={"matplotlib": False}) no plots are reported. However, when it is True plots are being logged twice.

Thanks for reporting @chmjelek - We'll take a look.

Hi @chmjelek ! Does this ever happen for epochs > 1? I think that when epochs==1 the plots you are seeing being reported twice are actually plotted via ultralytics themselves twice, so we report them automatically as well. If that's the case there is not much we can do.

@eugen-ajechiloae-clearml you are right, it only happens when epochs==1. Thank you!