Skip to content
Snippets Groups Projects
Unverified Commit 0f62a6c0 authored by Mashiro's avatar Mashiro Committed by GitHub
Browse files

[Fix] Remove besk ckpt only in master rank (#682)

parent 103ad607
No related branches found
No related tags found
No related merge requests found
......@@ -408,7 +408,9 @@ class CheckpointHook(Hook):
best_score = key_score
runner.message_hub.update_info(best_score_key, best_score)
if best_ckpt_path and self.file_client.isfile(best_ckpt_path):
if best_ckpt_path and \
self.file_client.isfile(best_ckpt_path) and \
is_main_process():
self.file_client.remove(best_ckpt_path)
runner.logger.info(
f'The previous best checkpoint {best_ckpt_path} '
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment