Hey 🙂 I had a similar issue today and found this solution:
In my case this codebase was using a .pt
filetype which was being picked up and logged as a model even though it was not.
import os
from clearml import Task
from clearml.binding.frameworks import WeightsFileHandler
task = Task.init(
project_name="task_project",
task_name="task_name",
task_type=Task.TaskTypes.training,
)
def filter_out_pt_files(operation_type, model_info):
is_pt_file = os.path.splitext(model_info.local_model_path)[-1] == ".pt"
if is_pt_file:
return None
return model_info
WeightsFileHandler.add_pre_callback(filter_out_pt_files)
...
If you can identify a patten in the YOLOv8 output files you can probably also filter them out 🙂
If anyone knows a better way, would love to hear about it 🙂
If you added a print there like:
def filter_out_pt_files(operation_type, model_info):
print(model_info.__dict__)
return model_info
You can see what is bring picked up. If there is a common path etc you can filter that out
Thank you Tom! Do you add callback to task to filter the files or is that some custom logging code that you created?
I need to add callback for it to filter out anything with .pt