Hello @<1523701205467926528:profile|AgitatedDove14> ,
Good news! It seems that using the list of URLs retrieved via "POST /events.get_task_events" and then deleting the corresponding images using StorageHelper
class effectively does the trick! 🏆 FYI, here is the little function I wrote for deleting the files:
from clearml.storage.helper import StorageHelper
def delete_image_from_clearml_server(image_url: str) -> None:
storage_helper = StorageHelper.get(url=image_url)
try:
storage_helper.delete(path=image_url)
except Exception as e:
raise ValueError(f"Could not remove image with URL '{image_url}': {e}")
Now, even if this function with StorageHelper
works fine, I observed that some images are not referenced in "/events.get_task_events" event list (even if I wait some time) 😥 . In fact, they physically exist on the server, but no URL points towards those. This implies that those few images are not detected and hence not deleted.
Are you aware of a limitation of "/events.get_task_events" preventing from fetching some of the images stored on the server? 🤔
Here is a picture and a video illustrating the fact that 18 images were effectively deleted, but 2 have not been listed in the events of "/events.get_task_events" and were hence not deleted...
Thank you very much for your insight!
Have a nice weekend 😉