fix: create the metrics tracker only on trainer rank zero - #782
Draft
maocheng23 wants to merge 1 commit into
Draft
fix: create the metrics tracker only on trainer rank zero#782maocheng23 wants to merge 1 commit into
maocheng23 wants to merge 1 commit into
Conversation
Every trainer rank previously constructed its own W&B/MLflow run or wrote the same TensorBoard directory, duplicating one logical metric stream world-size times. Non-zero ranks now receive no logger; the trainer controller already treats a missing logger as log-nothing, and producer roles keep the console logger. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Stack 3/5 replacing draft #766. Every trainer rank currently constructs its own tracker: W&B/MLflow runs are duplicated world-size times and TensorBoard ranks write the same directory. A 32-rank colocated K3 job would create 32 W&B runs; existing multi-rank disaggregated consumers already suffer this.
Modifications
_configured_loggerreturnsNoneon non-zero global ranks for trainer-bearing roles. The trainer controller already treats a missing logger as log-nothing, and_close_configured_logger(None)is a no-op. Producer roles keep the console logger.Related Issues
Splits #766. Stack: #1 capture-rows ← #2 teardown-abort ← #3 (this) ← #4 colocated-core ← #5 hybrid-shard.
Accuracy Test
test_only_global_rank_zero_creates_a_training_logger.Checklist
black --checkandisort --check-only).