Skip to content

Commit 5cb9fe6

Browse files
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>
1 parent 15e82d2 commit 5cb9fe6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/loggers/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ def on_train_end(self, last, best, epoch, results):
233233
self.wandb.finish_run()
234234

235235
if self.clearml and not self.opt.evolve:
236-
self.clearml.task.update_output_model(model_path=str(best if best.exists() else last), name='Best Model')
236+
self.clearml.task.update_output_model(model_path=str(best if best.exists() else last),
237+
name='Best Model',
238+
auto_delete_file=False)
237239

238240
def on_params_update(self, params: dict):
239241
# Update hyperparams or configs of the experiment

0 commit comments

Comments
 (0)