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>
This commit is contained in:
Victor Sonckandpre-commit-ci[bot] authored and GitHub committed 2022-09-03 20:49:25 +02:00
1 parent 15e82d2967
commit 5cb9fe612a
1 file changed
+3 -1
+3 -1
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