Make sure best.pt model file is preserved ClearML (#9265)

* Make sure best.pt model file is preserved ClearML

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
pull/9274/head
Victor Sonck 2022-09-03 20:49:25 +02:00 committed by GitHub
parent 15e82d2967
commit 5cb9fe612a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -233,7 +233,9 @@ class Loggers():
self.wandb.finish_run()
if self.clearml and not self.opt.evolve:
self.clearml.task.update_output_model(model_path=str(best if best.exists() else last), name='Best Model')
self.clearml.task.update_output_model(model_path=str(best if best.exists() else last),
name='Best Model',
auto_delete_file=False)
def on_params_update(self, params: dict):
# Update hyperparams or configs of the experiment