Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ UniLab 是一个 **高性能、模块化、contract 驱动** 的 RL infrastructu
| 区域 | 不可破坏的不变量 |
|------|----------------|
| Env | `NpEnvState.obs` 必须是 dict;`reset()` 返回 `(obs_dict, info_dict)`;`obs_groups_spec` 影响 wrapper 和 learner 维度。 |
| Config / Reward | reward 通过 Hydra 注入;`training.sim_backend` 和 `motrix_legacy` 必须尊重显式 override。 |
| Config / Reward | reward 通过 Hydra 注入;后端切换必须通过 `task=<task>/<backend>` 选择 owner YAML,`training.sim_backend` 只是 owner YAML 的身份字段,不能单独 override 来切后端。算法超参数直接走 YAML compose,不经 Python 层解释。 |
| Backend | backend-specific 逻辑留在 backend / env 适配层,不向训练脚本扩散。 |
| Async | 不绕开 runner lifecycle,也不另起 collector / learner 同步协议。 |

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Use GitHub Issues to report bugs or propose features.

UniLab uses Hydra + dataclass configuration:

- **Add a new task**: create YAML under `conf/{algo}/task/` and use `# @package _global_`
- **Add a new task entry**: create a single owner YAML under `conf/{algo}/task/...` and use `# @package _global_`
- **Change hyperparameters**: edit the matching YAML or use CLI overrides such as `algo.num_envs=2048`
- **Add a new algorithm**: add the dataclass in `structured_configs.py` and create the matching `conf/` directory

Expand Down
3 changes: 1 addition & 2 deletions conf/appo/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
defaults:
- _self_
- reward: default
- task: go1_joystick
- task: go1_joystick/mujoco

algo:
algo: appo
Expand Down
12 changes: 0 additions & 12 deletions conf/appo/reward/allegro_appo.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions conf/appo/reward/default.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions conf/appo/reward/g1_motion_tracking_motrix.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# @package _global_
defaults:
- override /reward: allegro_appo

training:
task_name: AllegroInhandRotation

sim_backend: mujoco
algo:
num_envs: 16384
steps_per_env: 8
Expand All @@ -16,3 +13,14 @@ algo:
obs_normalization: true
critic:
obs_normalization: true
reward:
scales:
rotate: 1.25
obj_linvel: -0.3
pose_diff: -0.3
torque: -0.1
work: -2.0
drop: 0.0
angvel_clip_min: -0.5
angvel_clip_max: 0.5
reset_z_threshold: 0.125
13 changes: 0 additions & 13 deletions conf/appo/task/g1_flip_tracking.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# @package _global_
training:
task_name: G1FlipTracking
sim_backend: motrix
play_steps: 1000
algo:
num_envs: 1024
max_iterations: 5000
save_interval: 500
reward:
scales:
motion_global_root_pos: 0.5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# @package _global_
training:
task_name: G1FlipTracking
sim_backend: mujoco
play_steps: 1000
algo:
num_envs: 1024
max_iterations: 5000
save_interval: 500
reward:
scales:
motion_global_root_pos: 0.5
Expand Down
9 changes: 0 additions & 9 deletions conf/appo/task/g1_joystick.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# @package _global_
training:
task_name: G1JoystickFlatTerrain
sim_backend: mujoco
algo:
max_iterations: 500
save_interval: 100
reward:
scales:
tracking_lin_vel: 2.0
Expand All @@ -18,4 +24,3 @@ reward:
min_base_height: 0.55
max_tilt_deg: 25.0
pose_weights: [0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 0.01, 1.0, 5.0, 0.01, 5.0, 5.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0, 50.0]

13 changes: 0 additions & 13 deletions conf/appo/task/g1_motion_tracking.yaml

This file was deleted.

29 changes: 29 additions & 0 deletions conf/appo/task/g1_motion_tracking/motrix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# @package _global_
training:
task_name: G1MotionTracking
sim_backend: motrix
play_steps: 1000
algo:
num_envs: 1024
max_iterations: 5000
save_interval: 500
reward:
scales:
motion_global_root_pos: 0.5
motion_global_root_ori: 0.5
motion_body_pos: 1.0
motion_body_ori: 1.0
motion_body_lin_vel: 1.0
motion_body_ang_vel: 1.0
motion_joint_pos: 0.0
motion_joint_vel: 0.0
action_rate_l2: -0.1
joint_limit: -10.0
std_root_pos: 0.3
std_root_ori: 0.4
std_body_pos: 0.3
std_body_ori: 0.4
std_body_lin_vel: 1.0
std_body_ang_vel: 3.14
std_joint_pos: 0.2
std_joint_vel: 1.0
29 changes: 29 additions & 0 deletions conf/appo/task/g1_motion_tracking/mujoco.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# @package _global_
training:
task_name: G1MotionTracking
sim_backend: mujoco
play_steps: 1000
algo:
num_envs: 1024
max_iterations: 5000
save_interval: 500
reward:
scales:
motion_global_root_pos: 0.5
motion_global_root_ori: 0.5
motion_body_pos: 1.0
motion_body_ori: 1.0
motion_body_lin_vel: 1.0
motion_body_ang_vel: 1.0
motion_joint_pos: 0.0
motion_joint_vel: 0.0
action_rate_l2: -0.1
joint_limit: -10.0
std_root_pos: 0.3
std_root_ori: 0.4
std_body_pos: 0.3
std_body_ori: 0.4
std_body_lin_vel: 1.0
std_body_ang_vel: 3.14
std_joint_pos: 0.2
std_joint_vel: 1.0
6 changes: 0 additions & 6 deletions conf/appo/task/go1_joystick.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# @package _global_
training:
task_name: Go1JoystickFlatTerrain
sim_backend: mujoco
algo:
max_iterations: 150
reward:
scales:
tracking_lin_vel: 1.0
Expand All @@ -8,8 +13,6 @@ reward:
base_height: -100.0
action_rate: -0.005
similar_to_default: -0.1
alive: 0.0
contact: 0.24
swing_feet_z: 4.0
tracking_sigma: 0.25
base_height_target: 0.3
6 changes: 0 additions & 6 deletions conf/appo/task/go2_joystick.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# @package _global_
training:
task_name: Go2JoystickFlatTerrain
sim_backend: mujoco
algo:
max_iterations: 150
reward:
scales:
tracking_lin_vel: 1.0
Expand Down
3 changes: 1 addition & 2 deletions conf/offpolicy/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
defaults:
- _self_
- algo: sac
- reward: default
- task: go1_joystick
- task: ${algo}/go1_joystick/mujoco

training:
task_name: Go1JoystickFlatTerrain
Expand Down
2 changes: 0 additions & 2 deletions conf/offpolicy/reward/default.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions conf/offpolicy/task/g1_sac.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions conf/offpolicy/task/go1_joystick.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions conf/offpolicy/task/go2_joystick.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# @package _global_
defaults:
- override /reward: default

training:
task_name: AllegroInhandRotationSac
sim_backend: mujoco
algo:
num_envs: 2048
batch_size: 16384
Expand All @@ -17,3 +15,15 @@ algo:
alpha_init: 0.001
target_entropy_ratio: 0.0
max_grad_norm: 1.0
reward:
scales:
rotate: 0.0
alive: 10.0
obj_linvel: -0.0
pose_diff: -0.0
torque: -0.0
work: -0.0
drop: -4000.0
angvel_clip_min: -0.5
angvel_clip_max: 0.5
reset_z_threshold: 0.125
Loading