Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimizer global step removal #76

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading