rsl_rl
cosmic_warp.rl.adapters.rsl_rl
rsl_rl adapter for :class:cosmic_warp.rl.VecEnv.
Wraps the neutral environment as an rsl_rl.env.VecEnv so it can be trained
with rsl_rl's OnPolicyRunner (PPO). The translation is thin: it maps
observations into the TensorDict group format, collapses the split
terminated/truncated into rsl_rl's single dones plus
extras["time_outs"], and copies actions in through the zero-copy action
view.
Requires the rsl-rl optional dependency (pip install "cosmic-warp[rsl-rl]"),
which pulls in PyTorch. Tested against rsl-rl-lib 5.x.
RslRlVecEnv
RslRlVecEnv(env: VecEnv)
Bases: VecEnv
Present a :class:cosmic_warp.rl.VecEnv through the rsl_rl interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
env
|
VecEnv
|
The COSMIC WARP environment to wrap. |
required |
Source code in cosmic_warp/rl/adapters/rsl_rl.py
vec_env
property
vec_env: VecEnv
The wrapped COSMIC WARP :class:~cosmic_warp.rl.VecEnv (for
evaluation loops outside the trainer).
default_ppo_cfg
default_ppo_cfg(
num_steps_per_env: int = 24,
hidden_dims=(128, 128),
learning_rate: float = 0.001,
entropy_coef: float = 0.005,
) -> dict
A minimal, working OnPolicyRunner training config for continuous
control. Tweak or replace freely — this is a convenience default, not a
tuned recipe.