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
6 changes: 3 additions & 3 deletions docs/sphinx/source/en/2-user_guide/3-backends/7-newton.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ Genesis quirk) is needed; the rank-local device reaches spawn collectors as
a `newton_device="cuda:N"` env override, and uni_rl's collector-side
process binding is injection-based — UniLab injects
`bind_backend_process_device_for_backend`, which covers both mjwarp and
newton — while the SAC owner raises the
collector tick-0 timeout to 180 s to cover Warp kernel compilation on the
cold path.
newton — while SAC handles learner-owned warmup before collector startup and
cold materialization through the collector-ready handshake instead of using a
collector tick timeout.

## Installation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ CUDA 设备语义,无需 Genesis 那样的 `CUDA_VISIBLE_DEVICES` 钉卡;ran
本地设备通过 env override 以 `newton_device="cuda:N"` 传入 spawn
collector,且 uni_rl 的 collector 进程绑定为注入式——UniLab 注入的
`bind_backend_process_device_for_backend` 同时覆盖 mjwarp 与
newton;SAC owner 将 collector tick-0 超时提升到 180 s 以覆盖 Warp
内核编译的冷路径。
newton;SAC 会在 collector 启动前执行 learner 侧预热,并通过
collector-ready 握手覆盖冷物化,不再使用 collector tick 超时。

## 安装

Expand Down
1 change: 0 additions & 1 deletion src/unilab/conf/flashsac/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ training:
env_steps_per_sync: 1
# Seconds the learner waits for each collector inference tick after the
# collector-ready handshake.
inference_request_timeout_sec: 30.0
trace_enabled: false
trace_output_dir: null
trace_thread_time: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ training:
play_render_mode: auto
# First tick includes collector env construction; genesis JIT startup exceeds
# the 30s default (same override as sac g1_walk_flat/genesis).
inference_request_timeout_sec: 180.0
env:
# GPU device id for the process-wide Genesis session. Multi-GPU training
# overrides this cold-path field from the rank topology; zero preserves the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ training:
sim_backend: newton
# First tick includes collector env construction; newton startup exceeds the
# 30s default (same override as sac g1_walk_flat/newton).
inference_request_timeout_sec: 180.0
env:
# A null device is intentional: the off-policy collector binder injects the
# rank-local CUDA device before materialization. 320/512 leaves headroom
Expand Down
3 changes: 0 additions & 3 deletions src/unilab/conf/sac/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ training:
log_root: null
log_dir: null
env_steps_per_sync: 1
# Coordination window for collector inference ticks. The first learner update
# can include ROCm/CUDA compilation, so keep this above measured cold-start times.
inference_request_timeout_sec: 90.0
trace_enabled: false
trace_output_dir: null
trace_thread_time: false
Expand Down
1 change: 0 additions & 1 deletion src/unilab/conf/sac/task/g1_motion_tracking/genesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ training:
play_render_mode: auto
# First tick includes collector env construction; genesis JIT startup exceeds
# the 30s default (same override as sac g1_walk_flat/genesis).
inference_request_timeout_sec: 180.0
env:
# GPU device id for the process-wide Genesis session. Multi-GPU training
# overrides this cold-path field from the rank topology; zero preserves the
Expand Down
4 changes: 0 additions & 4 deletions src/unilab/conf/sac/task/g1_motion_tracking/newton.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ defaults:
training:
task_name: G1MotionTrackingSAC
sim_backend: newton
# Newton compiles its Warp kernels on the materialize cold path, which
# exceeds the runner's default 30 s collector tick-0 budget; raise it for
# this backend (same precedent as the Genesis owner).
inference_request_timeout_sec: 180.0
env:
# A null device is intentional: the off-policy collector binder injects the
# rank-local CUDA device before materialization. 320/512 leaves headroom
Expand Down
4 changes: 0 additions & 4 deletions src/unilab/conf/sac/task/g1_walk_flat/genesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ training:
task_name: G1WalkFlat
sim_backend: genesis
play_render_mode: auto
# Genesis compiles its kernels on the materialize cold path (~35 s at
# num_envs=2048 on an RTX 4090, no cross-process cache), which exceeds the
# runner's default 30 s collector tick-0 budget; raise it for this backend.
inference_request_timeout_sec: 180.0
algo:
num_envs: 2048
learning_starts: 10
Expand Down
4 changes: 0 additions & 4 deletions src/unilab/conf/sac/task/g1_walk_flat/newton.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ defaults:
training:
task_name: G1WalkFlat
sim_backend: newton
# Newton compiles its Warp kernels on the materialize cold path, which
# exceeds the runner's default 30 s collector tick-0 budget; raise it for
# this backend (same precedent as the Genesis owner).
inference_request_timeout_sec: 180.0
algo:
num_envs: 2048
learning_starts: 10
Expand Down
1 change: 0 additions & 1 deletion src/unilab/conf/warpsac/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ training:
log_root: null
log_dir: null
env_steps_per_sync: 1
inference_request_timeout_sec: 30.0
trace_enabled: false
trace_output_dir: null
trace_thread_time: false
Expand Down
7 changes: 0 additions & 7 deletions tests/algos/test_offpolicy_double_buffer_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,6 @@ def test_sac_dispatch_constructs_unique_runner(monkeypatch: pytest.MonkeyPatch):
"nvtx_profile_ranges": cfg.training.nvtx_profile_ranges,
"critic_obs_dim": 6,
}
assert runner.kwargs["inference_request_timeout_sec"] == 90.0


def test_sac_genesis_owner_raises_inference_request_timeout():
"""Genesis kernel compilation exceeds the 30 s default tick-0 budget."""
cfg = _offpolicy_cfg(["task=g1_walk_flat/genesis"])
assert cfg.training.inference_request_timeout_sec == 180.0


def test_sac_owner_custom_runtime_can_override_base_learner_kwargs(
Expand Down
2 changes: 0 additions & 2 deletions tests/config/test_g1_motion_tracking_owners.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def test_sac_g1_motion_tracking_genesis_inherits_mujoco_parity() -> None:
assert cfg.training.task_name == "G1MotionTrackingSAC"
assert cfg.training.sim_backend == "genesis"
assert cfg.training.play_render_mode == "auto"
assert cfg.training.inference_request_timeout_sec == 180.0
assert cfg.env.genesis_device_id == 0
assert cfg.env.genesis_integrator == "implicitfast"
# Genesis legacy scenes declare no model-field reset terms and no interval
Expand Down Expand Up @@ -112,7 +111,6 @@ def test_sac_g1_motion_tracking_newton_keeps_full_dr() -> None:
cfg = _compose_sac("g1_motion_tracking/newton")
assert cfg.training.task_name == "G1MotionTrackingSAC"
assert cfg.training.sim_backend == "newton"
assert cfg.training.inference_request_timeout_sec == 180.0
assert cfg.env.newton_device is None
assert cfg.env.newton_nconmax == 320
assert cfg.env.newton_njmax == 512
Expand Down
Loading