diff --git a/mmcv/runner/epoch_based_runner.py b/mmcv/runner/epoch_based_runner.py index f3f6942719..fcc0eafac1 100644 --- a/mmcv/runner/epoch_based_runner.py +++ b/mmcv/runner/epoch_based_runner.py @@ -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) diff --git a/mmcv/runner/iter_based_runner.py b/mmcv/runner/iter_based_runner.py index 0d16cf6418..db4de484fc 100644 --- a/mmcv/runner/iter_based_runner.py +++ b/mmcv/runner/iter_based_runner.py @@ -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)