ROLL with Atropos environments#426
Open
RUFFY-369 wants to merge 9 commits intoalibaba:mainfrom
Open
Conversation
Implements a formal Execution Bridge pattern to adapt Atropos' trajectory-based engine to ROLL's step-based interface. - Implements AtroposEnv (gem.Env) with controlled rollout execution. - Adds AtroposExecutionBridge for action injection and turn boundary detection. - Adds dynamic manager for loading Atropos environments by module path. - Updates documentation on abstraction boundaries and replay trade-offs. - Includes standalone verify_atropos.py for integration validation.
|
|
10 tasks
Author
|
soft ping @PanAndy 🙏 |
Collaborator
|
okk,I’ll review the code over the next couple of days—please wait a moment. |
Author
Got it, thanks for the heads up! Take your time; happy to jump in if anything needs context or changes 🙏 |
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.
📝 Description
This PR integrates the Atropos from NousResearch as a modular agentic adapter within the ROLL framework. It introduces a Universal Reward Bridge that acts as a configurable adapter for Atropos environments, enabling ROLL to natively process reasoning trajectories from any Atropos-based task (Math, Code, etc.) using a domain-agnostic, marker-based reward system.
Fixes
Solves issue #427
🚀 Key Features
1. Atropos Agentic Adapter
atropos_envas a first-classgem.Envprovider.AtroposEnvandAtroposExecutionBridgeto handle the asynchronous lifecycle and trajectory collection of Atropos reasoning servers.2. Universal Reward Bridge (R1-Style Training)
reward_configblock that enables process-based rewards without modifying environment code.format_markers(e.g.,<think>,\boxed{}) andlength_bountyto provide a learning signal during early-stage training stalemates where terminal rewards are sparse.3. Distributed Infrastructure Hardening
tqdmanddatasets) within the Atropos bridge. This eliminates the lock-contention deadlocks commonly seen when Ray workers contend for signal handlers during distributed rollout.CPU/GPUvsnum_cpus/num_gpus), ensuring compatibility across Ray 2.0+ clusters.4. Production Readiness
examples/agentic_demo/atropos_gsm8k_grpo_qwen25_0.5b.yaml.🛠 Architecture Overview
Verification Results (100-step GRPO run)
Successfully validated the integration using Qwen2.5-0.5B-Instruct in a distributed 2x 3090 environment.
Notes on Convergence:
Final Step Training Metrics:
tokens/response_length/meanactor/total_losscritic/advantages/meancritic/entropy/meanThe near-zero mean advantage indicates that the reward normalization across the GRPO groups is functioning correctly, allowing the policy to update without destabilizing.
📋 How to Run
# Ensure WANDB_API_KEY is set in your environment bash examples/agentic_demo/run_atropos_gsm8k.sh⚙️ Hardware Snapshot (Tested)
🔘 Types of Change
cc @PanAndy @HuangJoJo