Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
HAOCHENYE committed Sep 22, 2022
1 parent 3c8edd5 commit 462d911
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mmengine/runner/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,10 @@ def resume(self,

resumed_dataset_meta = checkpoint['meta'].get('dataset_meta', None)
dataset_meta = getattr(self.train_dataloader.dataset, 'metainfo', None)

# `resumed_dataset_meta` and `dataset_meta` could be object like
# np.ndarray, which cannot be directly judged as equal or not,
# therefore we just compared their dumped results.
if pickle.dumps(resumed_dataset_meta) != pickle.dumps(dataset_meta):
warnings.warn(
'The dataset metainfo from the resumed checkpoint is '
Expand Down

0 comments on commit 462d911

Please sign in to comment.