Skip to content

fix: create the metrics tracker only on trainer rank zero - #782

Draft
maocheng23 wants to merge 1 commit into
maocheng/colocate-2-teardown-abortfrom
maocheng/colocate-3-rank0-tracker
Draft

fix: create the metrics tracker only on trainer rank zero#782
maocheng23 wants to merge 1 commit into
maocheng/colocate-2-teardown-abortfrom
maocheng/colocate-3-rank0-tracker

Conversation

@maocheng23

Copy link
Copy Markdown
Collaborator

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_logger returns None on 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

  • New test_only_global_rank_zero_creates_a_training_logger.

Checklist

  • Format your code according to the Code Formatting with Pre-Commit (black --check and isort --check-only).
  • Add unit tests.
  • Update documentation as needed (none needed).

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>
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.

1 participant