Skip to content

Commit

Permalink
Apply isort and black reformatting
Browse files Browse the repository at this point in the history
Signed-off-by: akoumpa <[email protected]>
  • Loading branch information
akoumpa committed May 16, 2024
1 parent d97fbcd commit 00f478e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nemo/core/optim/mcore_optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def load_state_dict(self, state_dict):
self.mcore_optimizer.load_state_dict(state_dict)

def sharded_state_dict(self, model_sharded_state_dict, optimizer_state_dict=None, is_loading=False, **kwargs):
sharding_type = 'fully_sharded_bucket_space' if kwargs.get('dist_ckpt_parallel_save', False) else 'dp_zero_gather_scatter'
sharding_type = (
'fully_sharded_bucket_space' if kwargs.get('dist_ckpt_parallel_save', False) else 'dp_zero_gather_scatter'
)
return self.mcore_optimizer.sharded_state_dict(
model_sharded_state_dict, is_loading=False, sharding_type=sharding_type
)
Expand Down

0 comments on commit 00f478e

Please sign in to comment.