Hi folks!
I am trying to create a pipeline with ClearML and Ultralytics. While there's already amazing integration among the tools, I found some difficulties trying to utilized all the magic features from ClearML. Specifically:
- I would like to use ClearML to log the experiment
- I would like to use ClearML to trigger
clearml-agnet
, change the InputModel
, dataset
, and hyperparameters, and train the new model base on new settings.
While experimenting with the following example script:
from clearml import Task
from ultralytics import YOLO, settings
# Step 1: Creating a ClearML Task
task = Task.init(project_name="sandbox", task_name="test_1")
# Step 2: Selecting the YOLOv8 Model
model_variant = "yolov8n"
task.set_parameter("model_variant", model_variant)
# Step 3: Loading the YOLOv8 Model
model = YOLO(f"{model_variant}.pt")
# Step 4: Setting Up Training Arguments
args = dict(data="coco8.yaml", epochs=16)
task.connect(args)
# Step 5: Initiating Model Training
results = model.train(**args)
The experiment is successfully log in clearml. But While I tried to clone the Task, and run in different agent, some issues occurs:
- The
data
in hparams use the local path, instead of a simple string. I can manually fix it by changing the settings in webui. (check attached photos)
- I tried editing the Input Model in the webui to the previous output, which is successful in the webui. But the console show it is still using the original yolov8n.pt , instead of the best.pt from previous training result. (check attached photos)
The best scenario will be:
- Set
InputModel
for Ultralytics
in webui, which I can pick from previous OutputModel
from different Tasks
- Set
dataset
for Ultralytics
in webui
- Trigger the expereiment with
clearml-agent
- and all other benefit from clearml
I read a bit on the doc about Model
OutputModel
InputModel
, and know how it can be integrate with Pytorch, but not sure how it works with Ultralytics
. Much appreciate your advise and help in advance!