Skip to content

Commit

Permalink
[Improve] improve checkpoint loading log (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
teamwong111 committed Nov 2, 2021
1 parent f9be3bc commit 2fe7d6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions mmcv/runner/base_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ def load_checkpoint(self,
map_location='cpu',
strict=False,
revise_keys=[(r'^module.', '')]):

self.logger.info('load checkpoint from %s', filename)
return load_checkpoint(
self.model,
filename,
Expand Down
3 changes: 2 additions & 1 deletion mmcv/runner/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ def load_checkpoint(cls, filename, map_location=None, logger=None):

checkpoint_loader = cls._get_checkpoint_loader(filename)
class_name = checkpoint_loader.__name__
mmcv.print_log(f'Use {class_name} loader', logger)
mmcv.print_log(
f'load checkpoint from {class_name[10:]} path: {filename}', logger)
return checkpoint_loader(filename, map_location)


Expand Down

0 comments on commit 2fe7d6c

Please sign in to comment.