From 611e69605c1f405ab97e245f9d5a8e4f121edecb Mon Sep 17 00:00:00 2001 From: TATP-233 Date: Sun, 27 Sep 2026 03:43:37 +0800 Subject: [PATCH] chore(offpolicy): remove inference request timeout config --- docs/sphinx/source/en/2-user_guide/3-backends/7-newton.md | 6 +++--- .../source/zh_CN/2-user_guide/3-backends/7-newton.md | 4 ++-- src/unilab/conf/flashsac/config.yaml | 1 - .../conf/flashsac/task/g1_motion_tracking/genesis.yaml | 1 - .../conf/flashsac/task/g1_motion_tracking/newton.yaml | 1 - src/unilab/conf/sac/config.yaml | 3 --- src/unilab/conf/sac/task/g1_motion_tracking/genesis.yaml | 1 - src/unilab/conf/sac/task/g1_motion_tracking/newton.yaml | 4 ---- src/unilab/conf/sac/task/g1_walk_flat/genesis.yaml | 4 ---- src/unilab/conf/sac/task/g1_walk_flat/newton.yaml | 4 ---- src/unilab/conf/warpsac/config.yaml | 1 - tests/algos/test_offpolicy_double_buffer_runner.py | 7 ------- tests/config/test_g1_motion_tracking_owners.py | 2 -- 13 files changed, 5 insertions(+), 34 deletions(-) diff --git a/docs/sphinx/source/en/2-user_guide/3-backends/7-newton.md b/docs/sphinx/source/en/2-user_guide/3-backends/7-newton.md index eb7042e83..da1d507b3 100644 --- a/docs/sphinx/source/en/2-user_guide/3-backends/7-newton.md +++ b/docs/sphinx/source/en/2-user_guide/3-backends/7-newton.md @@ -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 diff --git a/docs/sphinx/source/zh_CN/2-user_guide/3-backends/7-newton.md b/docs/sphinx/source/zh_CN/2-user_guide/3-backends/7-newton.md index b6c4fe9d7..316230f2a 100644 --- a/docs/sphinx/source/zh_CN/2-user_guide/3-backends/7-newton.md +++ b/docs/sphinx/source/zh_CN/2-user_guide/3-backends/7-newton.md @@ -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 超时。 ## 安装 diff --git a/src/unilab/conf/flashsac/config.yaml b/src/unilab/conf/flashsac/config.yaml index f7aeb2bbf..ffe38e712 100644 --- a/src/unilab/conf/flashsac/config.yaml +++ b/src/unilab/conf/flashsac/config.yaml @@ -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 diff --git a/src/unilab/conf/flashsac/task/g1_motion_tracking/genesis.yaml b/src/unilab/conf/flashsac/task/g1_motion_tracking/genesis.yaml index 74a516e5a..2e4c33c0a 100644 --- a/src/unilab/conf/flashsac/task/g1_motion_tracking/genesis.yaml +++ b/src/unilab/conf/flashsac/task/g1_motion_tracking/genesis.yaml @@ -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 diff --git a/src/unilab/conf/flashsac/task/g1_motion_tracking/newton.yaml b/src/unilab/conf/flashsac/task/g1_motion_tracking/newton.yaml index 4d8ece50c..65ed7f147 100644 --- a/src/unilab/conf/flashsac/task/g1_motion_tracking/newton.yaml +++ b/src/unilab/conf/flashsac/task/g1_motion_tracking/newton.yaml @@ -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 diff --git a/src/unilab/conf/sac/config.yaml b/src/unilab/conf/sac/config.yaml index e87d66c19..9ca739ca9 100644 --- a/src/unilab/conf/sac/config.yaml +++ b/src/unilab/conf/sac/config.yaml @@ -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 diff --git a/src/unilab/conf/sac/task/g1_motion_tracking/genesis.yaml b/src/unilab/conf/sac/task/g1_motion_tracking/genesis.yaml index 3a677a038..798653f90 100644 --- a/src/unilab/conf/sac/task/g1_motion_tracking/genesis.yaml +++ b/src/unilab/conf/sac/task/g1_motion_tracking/genesis.yaml @@ -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 diff --git a/src/unilab/conf/sac/task/g1_motion_tracking/newton.yaml b/src/unilab/conf/sac/task/g1_motion_tracking/newton.yaml index 5777dd6a2..34401094a 100644 --- a/src/unilab/conf/sac/task/g1_motion_tracking/newton.yaml +++ b/src/unilab/conf/sac/task/g1_motion_tracking/newton.yaml @@ -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 diff --git a/src/unilab/conf/sac/task/g1_walk_flat/genesis.yaml b/src/unilab/conf/sac/task/g1_walk_flat/genesis.yaml index 8a974fe9c..e283a901a 100644 --- a/src/unilab/conf/sac/task/g1_walk_flat/genesis.yaml +++ b/src/unilab/conf/sac/task/g1_walk_flat/genesis.yaml @@ -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 diff --git a/src/unilab/conf/sac/task/g1_walk_flat/newton.yaml b/src/unilab/conf/sac/task/g1_walk_flat/newton.yaml index a27df36fa..caabce9d3 100644 --- a/src/unilab/conf/sac/task/g1_walk_flat/newton.yaml +++ b/src/unilab/conf/sac/task/g1_walk_flat/newton.yaml @@ -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 diff --git a/src/unilab/conf/warpsac/config.yaml b/src/unilab/conf/warpsac/config.yaml index 3ff65b8d2..4f613be63 100644 --- a/src/unilab/conf/warpsac/config.yaml +++ b/src/unilab/conf/warpsac/config.yaml @@ -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 diff --git a/tests/algos/test_offpolicy_double_buffer_runner.py b/tests/algos/test_offpolicy_double_buffer_runner.py index bfba6e47d..ae180d1d0 100644 --- a/tests/algos/test_offpolicy_double_buffer_runner.py +++ b/tests/algos/test_offpolicy_double_buffer_runner.py @@ -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( diff --git a/tests/config/test_g1_motion_tracking_owners.py b/tests/config/test_g1_motion_tracking_owners.py index 819139ce1..e17358179 100644 --- a/tests/config/test_g1_motion_tracking_owners.py +++ b/tests/config/test_g1_motion_tracking_owners.py @@ -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 @@ -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