diff --git a/mmengine/_strategy/deepspeed.py b/mmengine/_strategy/deepspeed.py index d386497590..dcd60ec1db 100644 --- a/mmengine/_strategy/deepspeed.py +++ b/mmengine/_strategy/deepspeed.py @@ -553,8 +553,8 @@ def save_checkpoint( state_dict_kwargs = {} if digit_version(deepspeed.__version__) >= digit_version('0.13.2'): - state_dict_kwargs.update( - {'exclude_frozen_parameters': self.exclude_frozen_parameters}) + state_dict_kwargs[ + 'exclude_frozen_parameters'] = self.exclude_frozen_parameters if save_optimizer: if hasattr(self, 'optim_wrapper'):