fixing save checkpoint for best metric (#1694)

* fixing save checkpoint for  best metric

* fixing save checkpoint for  best metric v2

* Update mmcv/runner/hooks/evaluation.py

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>

* update for lint error

* fixing lint error

* fix lint

Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
This commit is contained in:
makifozkanoglu 2022-02-22 11:02:45 +03:00 committed by GitHub
parent 6d440e0e0c
commit 3a3514a54d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -344,7 +344,9 @@ class EvalHook(Hook):
runner.meta['hook_msgs']['best_ckpt'] = self.best_ckpt_path
runner.save_checkpoint(
self.out_dir, best_ckpt_name, create_symlink=False)
self.out_dir,
filename_tmpl=best_ckpt_name,
create_symlink=False)
runner.logger.info(
f'Now best checkpoint is saved as {best_ckpt_name}.')
runner.logger.info(