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}")
Hi @<1644147961996775424:profile|HurtStarfish47> , how do you specify file name for the model regardless of ClearML?
@<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)
Hi @<1744891825086271488:profile|RoundElephant20> , thanks for the help. By uploading with StorageManager, will the model be registered in the ClearML Artifact section ?
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
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 ).