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

[WIP][RFC] Required changes for integration with TorchTitan #82

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update log
fegin committed Jan 29, 2025
commit aab923919a4fc70bebd4e4170e005004782761b2
4 changes: 2 additions & 2 deletions torchft/checkpointing.py
Original file line number Diff line number Diff line change
@@ -134,9 +134,9 @@ def do_GET(self):
self.end_headers()

state_dict = ckpt_server._state_dict
self._logger.warning("Before torch.save ===================.")
logger.warning("Before torch.save ===================.")
torch.save(state_dict, self.wfile)
self._logger.warning("After torch.save ===================.")
logger.warning("After torch.save ===================.")

except Exception as e:
logger.exception(
4 changes: 2 additions & 2 deletions torchft/manager.py
Original file line number Diff line number Diff line change
@@ -608,12 +608,12 @@ def load_state_dict(self, state_dict: Dict[str, int]) -> None:
self._batches_committed = state_dict["batches_committed"]

def _manager_state_dict(self) -> Dict[str, object]:
self._logger.warning("Before state_dict ===================.")
self._logger.warn("Before state_dict ===================.")
ret = {
"user": self._user_state_dict(),
"torchft": self.state_dict(),
}
self._logger.warning("After state_dict ===================.")
self._logger.warn("After state_dict ===================.")
return ret

def state_dict(self) -> Dict[str, int]: