deepexperience/hypereyes/redaccel-to-relax
Claude Code and agent skill by deepexperience/hypereyes
- community
Checking that the SKILL.md file is still in the repository.
Migrate RL training algorithms from RedAccel to Relax framework.
Install
npx vskill@latest install deepexperience/hypereyes/redaccel-to-relaxSKILL.md
The same SKILL.md was published earlier as redai-infra/relax/redaccel-to-relax.
RedAccel → Relax Algorithm Migration
This skill guides migration of RL training algorithms (reward functions, agent environments, training scripts) from the RedAccel framework to Relax.
For mapping tables and code templates, see references/migration_mapping.md.
Migration overview
A RedAccel algorithm typically consists of:
| RedAccel Component | RedAccel Location | Relax Equivalent | Relax Location | |
|---|---|---|---|---|
| Reward class (GRPO/Group) | aipet_rl/reward_*.py | Async reward_func(args, sample) | examples/<algo>/reward_<algo>.py | |
| Agent / Tool env | aipet_rl/agent/*.py (ToolBase) | BaseInteractionEnv subclass | examples/<algo>/env_<algo>.py | |
| LLM-as-Judge helpers | aipet_rl/llm_judge.py | Inlined or standalone module | examples/<algo>/llm_judge.py | |
| Training launch script | exps/*.sh (redaccel-cli) | Shell script (ray job submit) | examples/<algo>/run_<algo>.sh | |
| Search / external tools | aipet_rl/agent/unified_search_async.py | Same module, imported from example dir | examples/<algo>/search_tools.py |
The algorithm code lives under examples/<algo>/ in Relax — not inside the framework core.
Workflow
Step 0: Create the target directory
Step 1: Migrate reward function
This is the most critical step. RedAccel and Relax have fundamentally different reward interfaces.
RedAccel pattern (class-based, synchronous)
Relax pattern (function-based, async)
Key conversion rules:
- Remove
@group_rewards_registry.register()/@rewards_registry.register()decorators - Remove class inheritance, extract
__call__body intocompute_score()function - Add
async def reward_func(args, sample: Sample, **kwargs)entry point - Map
completions[i]→sample.response,solutions[i]→sample.label,kwargs["extra_info"]→sample.metadata - Replace
from redaccel.verl.rewards.utils import ...with direct OpenAI/httpx calls or Relax utilities - If the reward uses
local_stepfor staged training, pass it viasample.metadataorargs
Step 2: Migrate agent environment (if applicable)
Only needed for agentic algorithms (e.g., tool-calling agents). Skip for pure chat/completion rewards.
RedAccel pattern (ToolBase)
Relax pattern (BaseInteractionEnv)
Key conversion rules:
reset(raw_prompt, multi_modal_data, ...)→__init__+reset()(no args)execute(action_string)→step(response_text)returning(obs_dict, done, info)- Observation format: return
{"obs_str": text, "role": "user", "multi_modal_data": {"image": [img]}}instead of raw chatml messages - The
build_env(sample, args)factory receives theSampleobject and extracts images fromsample.multimodal_inputs - Copy
base_env.pyfrom deepeyes example (or importBaseInteractionEnvfrom there) - Create
<algo>_config.yamlwithmax_turnsandrollout_interaction_env_path
Step 3: Migrate rollout (if agentic)
For agentic algorithms, the multi-turn rollout logic lives in a generate() function.
Recommendation: Copy examples/deepeyes/rollout.py and update DEFAULT_ENV_MODULE to point to your env module. The rollout is already generic and handles multi-turn conversation, multimodal data, and budget management.
Only modify the rollout if your algorithm has custom turn logic (e.g., parallel tool execution, custom stopping).
Step 4: Migrate LLM-as-Judge helpers
RedAccel uses redaccel.verl.rewards.utils.call_gemini_flash. In Relax, use direct OpenAI-compatible API calls:
Step 5: Migrate training launch script
RedAccel pattern
Relax pattern
Key conversion rules:
redaccel-cli train→ray job submit -- python3 relax/entrypoints/train.pytrainer.plugin_dir+reward_model.reward_name→--custom-rm-path examples.<algo>.reward.reward_funcredaccel-cli rlx setup→ remove (Relax handles this internally)- Hydra-style
key=valueargs → argparse--key valueargs - Model config: use
source scripts/models/<model>.shinstead of inline TP/PP/EP settings - Megatron checkpoint loading:
--hf-checkpoint/--load/--ref-loadinstead ofDIST_CKPT_PATH
Argument mapping quick reference
| RedAccel Argument | Relax Argument | |
|---|---|---|
reward_model.reward_name=ClassName | --custom-rm-path module.path.reward_func | |
trainer.plugin_dir=... | N/A (use module path in --custom-rm-path) | |
actor_rollout_ref.rollout.response_length=N | --rollout-max-response-len N | |
data.train_files=[...] | --prompt-data "[...]" | |
data.val_files=[...] | --eval-prompt-data name files... | |
actor_rollout_ref.actor.megatron.tensor_model_parallel_size=N | --tensor-model-parallel-size N | |
actor_rollout_ref.actor.megatron.pipeline_model_parallel_size=N | --pipeline-model-parallel-size N | |
algorithm.kl_penalty=kl | --kl-loss-coef 0.01 --kl-loss-type low_var_kl | |
BATCH_SIZE=N | --global-batch-size N | |
MICRO_BATCH_SIZE=N | --micro-batch-size N |
Important rules
- ALWAYS create a new
examples/<algo>/directory; never modifyrelax/engine/rewards/ - ALWAYS provide an
async def reward_func(args, sample, **kwargs)entry point - ALWAYS return a dict with a
"score"key from the reward function - ALWAYS use
Sampledataclass fields (sample.response,sample.label,sample.metadata) - NEVER use RedAccel imports (
from redaccel.verl...) in Relax code - NEVER use
redaccel-cliin Relax launch scripts - NEVER modify Relax core code (
relax/) for algorithm migration — keep everything inexamples/
References
references/migration_mapping.md- Detailed import mapping table and code transformation patterns
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingRL/relax-hypereyes/Relax/skills/redaccel-to-relax/SKILL.md
Popularity
- Repository stars
- 76
- Repository forks
- 1
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/deepexperience/hypereyes/redaccel-to-relax)