Repository navigation
[Observability 1/7] Toy trainers for observability development - #2601
Closed
felipemello1 wants to merge 1 commit into
Closed
felipemello1 wants to merge 1 commit into
felipemello1 wants to merge 1 commit into
Conversation
[ghstack-poisoned]
felipemello1
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
March 16, 2026 15:20
This was referenced Mar 16, 2026
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.
Stack from ghstack (oldest at bottom):
How to review
Focus on the read.me. It should give you a mental model moving forward.
For the toy examples, just glance over it. No need to nitpick or understand it deeply. It is a base for PR development and can be deleted later.
Summary
Two toy training scripts that serve as development sandboxes for the observability APIs. They're minimal but exercise the same patterns as a real workflow.
toy_spmd.py — 4-GPU SPMD trainer with 2D parallelism (DP=2, TP=2). Runs with
torch.distributed.run.toy_rl.py — Multi-actor RL loop using Monarch. A controller orchestrates a rollouter, reward scorer, and trainer.
Test plan
Overfitting to the same batch to show training.
Console output toy_spmd
Console output toy_rl
Each step logs both training loss and RL reward.
Run toy_spmd:
python -m torch.distributed.run --nproc_per_node=4 -m torchtitan.experiments.observability.toy_spmdRun toy_rl:
python -m torchtitan.experiments.observability.toy_rl