Skip to content

Log ZeRO and parallelism settings to monitor backends - #8401

Open
YeonwooSung wants to merge 4 commits into
deepspeedai:masterfrom
YeonwooSung:feat/monitor-log-parallelism-config
Open

Log ZeRO and parallelism settings to monitor backends#8401
YeonwooSung wants to merge 4 commits into
deepspeedai:masterfrom
YeonwooSung:feat/monitor-log-parallelism-config

Conversation

@YeonwooSung

Copy link
Copy Markdown

What

Record static ZeRO, precision, and DP/TP/PP/SP topology on enabled monitor backends when the engine finishes initializing.

Fixes #7494

Why

WandbMonitor only called wandb.init() and never wrote run config. The engine already logs per-step scalars (lr, loss_scale, timings), but users could not see ZeRO stage, offload devices, or parallelism sizes on the W&B/Comet/TensorBoard run.

Changes

  • collect_monitor_config() builds a JSON-safe snapshot (stage, offload, precision, batch sizes, DP/TP/PP/SP rank and world size)
  • MonitorMaster.update_config() fans out on rank 0
  • WandB: wandb.config.update(..., allow_val_change=True)
  • Comet: experiment.log_parameters(...)
  • TensorBoard: add_text("DeepSpeed/config", ...)
  • CSV: one-time deepspeed_config.csv
  • Engine calls this at the end of __init__ when monitoring is enabled
  • Tutorial JSON in docs/_tutorials/monitor.md was missing commas between backend objects; that is fixed here

This PR does not add new engine rank getters; those are a separate follow-up to #7423.

Testing

  • Unit tests in tests/unit/monitor/test_monitor.py (rank-0-only WandB/MonitorMaster, backend update_config, engine collection)
  • pre-commit run --files on the touched files

Record static training topology on WandB/Comet/TensorBoard/CSV at
engine init so runs are comparable without digging through logs.

Fixes deepspeedai#7494

Signed-off-by: YeonwooSung <neos960518@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f33ad0a6aa

ℹ️ 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".

Comment thread deepspeed/runtime/engine.py
Comment thread deepspeed/monitor/utils.py Outdated
Pipeline and caller-supplied MPUs keep topology on the MPU object, not
the legacy groups globals. Logging those globals made PP/TP runs look
like DP=world and TP=1.

Signed-off-by: YeonwooSung <neos960518@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REQUEST] Add automatic logging of parallelism and ZeRO config to WandbMonitor

1 participant