Cleanup model version artifacts when they are not present in DB

Bastien Abadie
2022-04-22T15:39:46Z

In the cleanup management command, add a new method to remove all model version files stored on the training bucket that are not linked anymore to a model version in database:

list all files in the bucket

find a ModelVersion matching the ID present in the filename

if nothing is found, delete immediately the file