Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hello, I Am Using The Clearml Integration With Ultralytics. I Have Very Simple Code

Hello, I am using the clearml integration with ultralytics. I have very simple code

task = Task.init(project_name="YOLO", task_name=ds_name, output_uri="
")
model = YOLO(model_base)
results = model.train()

The output model is properly uploaded to my bucket as " best.pt ". How can I specify a different filename for this model ?

  
  
Posted 20 days ago
Votes Newest

Answers 7


Hi @<1644147961996775424:profile|HurtStarfish47> ,

ClearML will automatically upload you model with the original name and data, if not mistaken, best.pt is given by default from the train function.

You can rename it after the training and upload it, something like:

import shutil

# Rename best model checkpoint after training
shutil.move("runs/train/my_model/weights/best.pt", "my_model.pt")

# upload with the StorageManager
model_path = "my_model.pt"
# Define your S3 URL path (bucket and folder), e.g., 

s3_path = "
"

# Upload the file to S3
uploaded_model_path = StorageManager.upload_file(local_path=model_path, remote_url=s3_path)

print(f"Model uploaded to {uploaded_model_path}")
  
  
Posted 16 days ago

Hi @<1744891825086271488:profile|RoundElephant20> , thanks for the help. By uploading with StorageManager, will the model be registered in the ClearML Artifact section ?

  
  
Posted 16 days ago

that's great, thanks !

  
  
Posted 16 days ago

The auto magical will register the original model as an artifact, so the model that will be register it the original one, you can upload the model to your task as a model (so it will get a model id, like in this example ) or as a regular artifact (like in this example ).

  
  
Posted 16 days ago

Hi @<1644147961996775424:profile|HurtStarfish47> , how do you specify file name for the model regardless of ClearML?

  
  
Posted 18 days ago

@<1644147961996775424:profile|HurtStarfish47> , you also have the auto_connect_frameworks parameter of Task.init do disable the automatic logging and then manually log using the Model module to manually name and register the model (and upload ofc)

  
  
Posted 16 days ago

I don't, Ultralytics just output a model in project/weights/best.pt. They don't expose a way to change that value. I'm happy to rename that file manually from the code, but likely it was already uploaded by ClearML automatically

  
  
Posted 17 days ago