Skip to content

Commit

Permalink
Merge pull request #76 from Helsinki-NLP/fix/optim-steps-saving
Browse files Browse the repository at this point in the history
optimizer global step removal
  • Loading branch information
TimotheeMickus authored Jun 1, 2024
2 parents 20bdc2f + 3d1e1a7 commit 4a32776
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mammoth/utils/optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def state_dict(self):
"""Returns the state dictionary"""
return {
'optimizers': {k: v.state_dict() for k, v in self.suboptimizers.items()},
'steps': self._steps,
# 'steps': self._steps,
}

def load_state_dict(self, state_dict):
Expand All @@ -372,7 +372,7 @@ def load_state_dict(self, state_dict):
else:
logger.info("Some components do not match. Do not load optimizer from checkpoint.")

self._steps = state_dict["steps"]
# self._steps = state_dict["steps"]

@property
def training_step(self):
Expand Down

0 comments on commit 4a32776

Please sign in to comment.