Repository navigation
[graph_trainer] Add nightly self-improvement scout and first report - #2838
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a GraphTrainer “nightly self-improvement scout” prompt (for Claude Code) plus an initial generated report to help proactively detect drift, coverage gaps, and documentation/config inconsistencies in torchtitan/experiments/graph_trainer.
Changes:
- Add a runnable nightly scout prompt at
torchtitan/experiments/graph_trainer/.claude/nightly.md. - Add the first scout output report at
torchtitan/experiments/graph_trainer/reports/2026-04-02.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| torchtitan/experiments/graph_trainer/.claude/nightly.md | New nightly prompt describing how to scan for upstream drift, TODO unblock status, test/CI gaps, and doc freshness. |
| torchtitan/experiments/graph_trainer/reports/2026-04-02.md | Initial scout report capturing discovered action items/opportunities/FYIs as of 2026-04-02. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yiming0416
left a comment
There was a problem hiding this comment.
This is very cool!
I think the comments from copilot on updating file path makes sense. We should give a clearer file path to avoid potential confusions.
|
|
||
| - Are there parallelism combinations that core torchtitan tests but | ||
| graph_trainer's integration_tests.py doesn't? Compare: | ||
| - `tests/integration_tests/test_llama3.py` vs `graph_trainer/tests/integration_tests.py` |
There was a problem hiding this comment.
There is no test_llama3.py.
It should be tests/integration_tests/models.py
There was a problem hiding this comment.
do we want to check-in one report per day? who's going to do this?
There was a problem hiding this comment.
yes, the report is the memory of the agent.
will automate this in agent first devvm, and it would show up as an PR.
I imagine the first thing I would do everyday is to review it.
There was a problem hiding this comment.
who's supposed to run this?
There was a problem hiding this comment.
Will run this as a nightly cron job in agent first devvm.
Add a nightly prompt (.claude/nightly.md) designed to be run by Claude Code to discover self-improvement opportunities — not breakage detection (CI handles that), but things like upstream API drift, test coverage gaps, unblocked TODOs, and code freshness issues. The scout covers 5 areas (all local, no network access required): 1. Core torchtitan delta review (opportunity/risk from upstream changes) 2. TODO unblock detection (dynamic discovery, local torch inspection) 3. Test & CI coverage gap analysis (file comparison vs workflow YAMLs) 4. Code freshness & technical debt (monkey-patches, private APIs, config drift) 5. Documentation freshness Removed from earlier version: performance opportunity discovery (produced no actionable output), open work tracking (requires GitHub API), CI status checks (requires GitHub API), git push (requires network access). Reports are written to graph_trainer/reports/YYYY-MM-DD.md. After the report, action items are implemented as one-commit-per-item on a graph_trainer/self_improve/YYYY-MM-DD branch. The first report (2026-04-02) surfaces two P0 findings: - Llama3 parallelize.py missing enable_cp/enable_sp in apply_tp() call, meaning context parallelism silently malfunctions despite README claiming CP support - fsdp_reshard_after_fwd_pass has zero test coverage (no unit or integration test) ghstack-source-id: 7c03f4a Pull Request resolved: #2806
4829bea to
74768b6
Compare
tianyu-l
left a comment
There was a problem hiding this comment.
Sounds reasonable. Let's give it a try.
The first report (2026-04-02) surfaces two P0 findings:
- Llama3 parallelize.py missing enable_cp/enable_sp in apply_tp() call, meaning context parallelism silently malfunctions despite README claiming CP support
- fsdp_reshard_after_fwd_pass has zero test coverage (no unit or integration test)
The 2nd seems being addressed by #2809
How about the 1st? Is the issue only in graph_trainer llama3 parallelize.py?
AFAIK, graph trainer has never test CP/SP path. |
…ytorch#2838) Add a nightly prompt (.claude/nightly.md) designed to be run by Claude Code to discover self-improvement opportunities — not breakage detection (CI handles that), but things like upstream API drift, test coverage gaps, unblocked TODOs, and code freshness issues. The scout covers 5 areas (all local, no network access required): 1. Core torchtitan delta review (opportunity/risk from upstream changes) 2. TODO unblock detection (dynamic discovery, local torch inspection) 3. Test & CI coverage gap analysis (file comparison vs workflow YAMLs) 4. Code freshness & technical debt (monkey-patches, private APIs, config drift) 5. Documentation freshness Removed from earlier version: performance opportunity discovery (produced no actionable output), open work tracking (requires GitHub API), CI status checks (requires GitHub API), git push (requires network access). Reports are written to graph_trainer/reports/YYYY-MM-DD.md. After the report, action items are implemented as one-commit-per-item on a graph_trainer/self_improve/YYYY-MM-DD branch. The first report (2026-04-02) surfaces two P0 findings: - Llama3 parallelize.py missing enable_cp/enable_sp in apply_tp() call, meaning context parallelism silently malfunctions despite README claiming CP support - fsdp_reshard_after_fwd_pass has zero test coverage (no unit or integration test) ghstack-source-id: 7c03f4a Pull Request resolved: pytorch#2806
…ytorch#2838) Add a nightly prompt (.claude/nightly.md) designed to be run by Claude Code to discover self-improvement opportunities — not breakage detection (CI handles that), but things like upstream API drift, test coverage gaps, unblocked TODOs, and code freshness issues. The scout covers 5 areas (all local, no network access required): 1. Core torchtitan delta review (opportunity/risk from upstream changes) 2. TODO unblock detection (dynamic discovery, local torch inspection) 3. Test & CI coverage gap analysis (file comparison vs workflow YAMLs) 4. Code freshness & technical debt (monkey-patches, private APIs, config drift) 5. Documentation freshness Removed from earlier version: performance opportunity discovery (produced no actionable output), open work tracking (requires GitHub API), CI status checks (requires GitHub API), git push (requires network access). Reports are written to graph_trainer/reports/YYYY-MM-DD.md. After the report, action items are implemented as one-commit-per-item on a graph_trainer/self_improve/YYYY-MM-DD branch. The first report (2026-04-02) surfaces two P0 findings: - Llama3 parallelize.py missing enable_cp/enable_sp in apply_tp() call, meaning context parallelism silently malfunctions despite README claiming CP support - fsdp_reshard_after_fwd_pass has zero test coverage (no unit or integration test) ghstack-source-id: 7c03f4a Pull Request resolved: pytorch#2806
…ytorch#2838) Add a nightly prompt (.claude/nightly.md) designed to be run by Claude Code to discover self-improvement opportunities — not breakage detection (CI handles that), but things like upstream API drift, test coverage gaps, unblocked TODOs, and code freshness issues. The scout covers 5 areas (all local, no network access required): 1. Core torchtitan delta review (opportunity/risk from upstream changes) 2. TODO unblock detection (dynamic discovery, local torch inspection) 3. Test & CI coverage gap analysis (file comparison vs workflow YAMLs) 4. Code freshness & technical debt (monkey-patches, private APIs, config drift) 5. Documentation freshness Removed from earlier version: performance opportunity discovery (produced no actionable output), open work tracking (requires GitHub API), CI status checks (requires GitHub API), git push (requires network access). Reports are written to graph_trainer/reports/YYYY-MM-DD.md. After the report, action items are implemented as one-commit-per-item on a graph_trainer/self_improve/YYYY-MM-DD branch. The first report (2026-04-02) surfaces two P0 findings: - Llama3 parallelize.py missing enable_cp/enable_sp in apply_tp() call, meaning context parallelism silently malfunctions despite README claiming CP support - fsdp_reshard_after_fwd_pass has zero test coverage (no unit or integration test) ghstack-source-id: 7c03f4a Pull Request resolved: pytorch#2806
Add a nightly prompt (.claude/nightly.md) designed to be run by Claude Code to discover self-improvement opportunities — not breakage detection (CI handles that), but things like upstream API drift, test coverage gaps, unblocked TODOs, and code freshness issues.
The scout covers 5 areas (all local, no network access required):
Removed from earlier version: performance opportunity discovery (produced no actionable output), open work tracking (requires GitHub API), CI status checks (requires GitHub API), git push (requires network access).
Reports are written to graph_trainer/reports/YYYY-MM-DD.md. After the report, action items are implemented as one-commit-per-item on a graph_trainer/self_improve/YYYY-MM-DD branch.
The first report (2026-04-02) surfaces two P0 findings:
ghstack-source-id: 7c03f4a1bf1d69f00ed296ac4357a60443142213
Pull Request resolved: #2806