Skip to content

feat: ForgeRL v2 M0–M1 vector-batch runtime and formal acceptance - #1

Draft
MrLPF wants to merge 74 commits into
masterfrom
feat/forge-rl-v2-bootstrap
Draft

MrLPF wants to merge 74 commits into
masterfrom
feat/forge-rl-v2-bootstrap

Conversation

@MrLPF

@MrLPF MrLPF commented Aug 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

This draft PR implements ForgeRL v2 M0 and the complete M1 code path. PyTorch remains responsible for tensors, autograd, CUDA, AMP, DDP and future FSDP2; ForgeRL owns RL sampling, inference, experience and orchestration.

master remains untouched and this PR remains draft.

Formal M1 subject

The production local topology is now one consistent subject across throughput and learning evidence:

C++/vectorized EnvRunner
  -> one contiguous observation batch
  -> VectorBatchInferenceRuntime
  -> one policy forward
  -> checked per-Actor/per-environment output views

Timing-based rendezvous, event-driven shared memory and process-mailbox services remain regression or fallback paths. They are not used to prove the formal vectorized M1 topology.

Completed M1 implementation

  • fixed transition semantics for terminated, truncated and infrastructure faults;
  • lossless trajectory fragmentation and transition identity audits;
  • bounded on-policy experience queue and versioned policy registry;
  • atomic active/staging policy replicas;
  • stable C ABI for vectorized C++ environments;
  • producer-defined VectorBatchInferenceRuntime;
  • identical vector-batch v2 subject in the PPO CartPole/Pendulum learning gate;
  • C++ VectorEnv -> vector-batch -> TransitionBatch -> ExperienceQueue -> PPO update integration test;
  • explicit FP32 tolerances for batched-versus-sliced checks on Python 3.11 and 3.12;
  • controlled three-repeat vector-batch stability gate;
  • pinned self-hosted formal workflow that combines throughput and five-seed learning evidence into m1-final.json.

Validation

The latest standard GitHub Actions run is green:

  • Python 3.11 core;
  • Python 3.12 core, 46 tests passed;
  • C++ vector-environment closed-loop test;
  • vector-batch PPO learning smoke for CartPole and Pendulum;
  • two-process Gloo learner test;
  • vector-batch stability screening with one warmup and three measured repeats.

Hosted screening reported stable vector-batch speedups well above the documented 2x threshold, but hosted results are not formal acceptance evidence.

Remaining formal execution gates

M1 is not described as accepted until the manual self-hosted workflow on a runner labeled forgerl-benchmark produces all three artifacts:

m1-learning-formal.json
m1-vector-batch-controlled.json
m1-final.json

The final artifact must have:

{"status": "GO"}

The formal gate requires five paired CartPole/Pendulum seeds, all target reaches, v2 time-to-target no worse than 1.05x v1, normalized AUC at least 0.95x v1, stable >=2x valid-row throughput, and all correctness audits passing.

Milestone order

M2 is frozen until M1 produces the persisted GO report, unless the user explicitly changes the milestone order. No merge or M1 acceptance claim is made by this update.

@MrLPF MrLPF changed the title feat: bootstrap ForgeRL v2 distributed runtime feat: implement ForgeRL v2 M0–M1 distributed runtime Aug 21, 2026
@MrLPF MrLPF changed the title feat: implement ForgeRL v2 M0–M1 distributed runtime feat: implement ForgeRL v2 M0–M1 with acceptance gates Aug 21, 2026
@MrLPF
MrLPF force-pushed the feat/forge-rl-v2-bootstrap branch 2 times, most recently from d1a5d22 to 1c5d50c Compare August 21, 2026 12:43
@MrLPF
MrLPF force-pushed the feat/forge-rl-v2-bootstrap branch from 989981a to be84cce Compare August 21, 2026 12:46
@MrLPF MrLPF changed the title feat: implement ForgeRL v2 M0–M1 with acceptance gates feat: implement ForgeRL v2 M0–M1 with controlled PPO learning gate Aug 21, 2026
@MrLPF MrLPF changed the title feat: implement ForgeRL v2 M0–M1 with controlled PPO learning gate feat: implement ForgeRL v2 M0–M1 with optimized node-local inference Aug 21, 2026
@MrLPF MrLPF changed the title feat: implement ForgeRL v2 M0–M1 with optimized node-local inference feat: implement ForgeRL v2 M0–M1 with event-driven inference tuning Aug 21, 2026
@MrLPF MrLPF changed the title feat: implement ForgeRL v2 M0–M1 with event-driven inference tuning feat: ForgeRL v2 M0–M1 mailbox hot path and isolated M2 coordinator Aug 21, 2026
MrLPF added 30 commits August 23, 2026 09:31
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