[codex] add fake R3 orchestrator debug mode#2801
Open
samsja wants to merge 1 commit into
Open
Conversation
9c67853 to
56440cc
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 56440cc. Configure here.
56440cc to
80b0a66
Compare
88b9f20 to
80b0a66
Compare
samsja
added a commit
that referenced
this pull request
Jun 14, 2026
…ed on #2801) Prunes heavy raw train-trajectory token/R3 payloads after samples, advantages, and pre-batch filters have run (keeping lightweight summaries for logging), adds compact scalar completion_temperature, releases sent train-batch and finalized rollout references, and calls trim_process_memory() after each batch so freed glibc heap returns to the OS. Includes the fake-R3 orchestrator debug harness (#2801) it is stacked on. Squashed from codex/orchestrator-r3-memory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
samsja
added a commit
that referenced
this pull request
Jun 14, 2026
…ed on #2801) Prunes heavy raw train-trajectory token/R3 payloads after samples, advantages, and pre-batch filters have run (keeping lightweight summaries for logging), adds compact scalar completion_temperature, releases sent train-batch and finalized rollout references, and calls trim_process_memory() after each batch so freed glibc heap returns to the OS. Includes the fake-R3 orchestrator debug harness (#2801) it is stacked on. Squashed from codex/orchestrator-r3-memory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

Summary
Adds a reusable orchestrator debug mode for memory and scheduling ablations without requiring real inference or trainer processes.
Memory reductions are split into the stacked follow-up PR: #2807.
What changed
debug.no_inference,debug.no_trainer,debug.fake_tokenizer, anddebug.log_memoryorchestrator flags.rl localrun the full orchestrator without spawning inference or trainer subprocesses when debug flags are enabled.tests/debug_envs/fake_r3_trajectory, a deterministic fake environment that emits heavy pre-tokenized multi-turn trajectories with optional GLM5-shaped R3 payloads.Fake R3 environment
The fake env is user-configurable through env args:
turnsseq_lenprompt_lencompletion_fractioninclude_r3routed_layersrouted_topkn_routed_expertsnum_examplesvocab_sizeDefaults model the GLM5 R3 shape:
78routed layers, top-k8,256routed experts.Validation
Validated earlier on this branch with orchestrator unit coverage and fake-R3 orchestrator stress runs. Memory optimizations are intentionally split into #2807.