Skip to content

Commit

Permalink
Fixed comments according to Lint Job
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniolanza1996 committed Jun 28, 2021
1 parent 2ba652c commit 9f36da0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions mmcv/runner/epoch_based_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ def save_checkpoint(self,
f'meta should be a dict or None, but got {type(meta)}')
if self.meta is not None:
meta.update(self.meta)
#Note: meta.update(self.meta) should be done before meta.update(epoch=self.epoch + 1, iter=self.iter)
#otherwise there will be problems with resumed checkpoints. More details in https://github.com/open-mmlab/mmcv/pull/1108
# Note: meta.update(self.meta) should be done before
# meta.update(epoch=self.epoch + 1, iter=self.iter) otherwise
# there will be problems with resumed checkpoints.
# More details in https://github.com/open-mmlab/mmcv/pull/1108
meta.update(epoch=self.epoch + 1, iter=self.iter)

filename = filename_tmpl.format(self.epoch + 1)
Expand Down
6 changes: 4 additions & 2 deletions mmcv/runner/iter_based_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ def save_checkpoint(self,
f'meta should be a dict or None, but got {type(meta)}')
if self.meta is not None:
meta.update(self.meta)
#Note: meta.update(self.meta) should be done before meta.update(epoch=self.epoch + 1, iter=self.iter)
#otherwise there will be problems with resumed checkpoints. More details in https://github.com/open-mmlab/mmcv/pull/1108
# Note: meta.update(self.meta) should be done before
# meta.update(epoch=self.epoch + 1, iter=self.iter) otherwise
# there will be problems with resumed checkpoints.
# More details in https://github.com/open-mmlab/mmcv/pull/1108
meta.update(epoch=self.epoch + 1, iter=self.iter)

filename = filename_tmpl.format(self.iter + 1)
Expand Down

0 comments on commit 9f36da0

Please sign in to comment.