fix(checkpointing): remove identical if/else arms and leftover debug print in WriterFactory - #8446
fix(checkpointing): remove identical if/else arms and leftover debug print in WriterFactory#8446simpleqt wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9324cc49e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| print( | ||
| f'WriterFactory: self._data_parallel_writer={self._data_parallel_writer} self._show_statistics={self._show_statistics}' | ||
| ) |
There was a problem hiding this comment.
Remove the now-empty print call
Every CheckpointWriterFactory construction still executes print(), so distributed checkpoint runs now emit one blank line per participating process. This leaves the debug side effect in place (and can pollute machine-readable stdout or logs); delete the call itself rather than only its argument.
Useful? React with 👍 / 👎.
…print in WriterFactory Both arms of the pure_dp conditional computed the same expression (AST-verified), and the constructor unconditionally printed a debug line to stdout of every user process that enables the fast checkpoint writer. Collapsed the conditional and removed the print. Signed-off-by: simpleqt <89645338+simpleqt@users.noreply.github.com>
9324cc4 to
9d74c0e
Compare
In
deepspeed/runtime/model_checkpointing/writer_factory.py:pure_dpif/else computed the byte-identical expression in both arms (AST-verified) — collapsed to a single assignment.print(f'WriterFactory: …')debug line that was dumped to stdout of every user process constructing the fast checkpoint writer (deepspeed/runtime/checkpoint_engine/fast_checkpoint_engine.py).Checklist
python -m py_compilepasses on the touched fileSigned-off-by: simpleqt 89645338+simpleqt@users.noreply.github.com