Repository navigation
refactor!: Roadmap #2434 API 命名规范化收尾 + unisim-core 2.0.0 集成 - #2453
Merged
Merged
Conversation
fix: remove dead API scaffolding (#2437)
refactor!: fix misleading public API names
Implements #2439 on top of dev/issue-2434-api-naming. This is a naming/API cleanup with no intended behavior change. It renames the Manager RNG module/class and env attribute, unsuffixes tensor-only EntityData tables, unifies reset and RL runtime naming, removes the always-true uses_tensor_actions contract flag, and deletes duplicate motion-tracking properties. Documentation and tests are updated with the renamed public surface. Validation: make check; make test; make test-all.
…ix-convention refactor: unify tensor API naming
Implements #2442 on top of dev/issue-2434-api-naming. Naming/API cleanup with no intended behavior change: - rl/algos: build_sac_double_buffer_runner/build_flashsac_double_buffer_runner -> build_double_buffer_runner; flash_sac/update.py -> objectives.py; validate_flashsac_actor -> validate_custom_actor; EnsembleFlashSACEmbedder/ EnsembleFlashSACBlock -> EnsembleEmbedder/EnsembleBlock; common/learner_boilerplate.py -> learner_base.py with LearnerBaseMixin; appo/runtime.py -> resolution.py - rl/runtime: offpolicy/runtime.py -> resolution.py; logging/common.py -> base.py; fold SharedBufferBase into ReplayBuffer (delete shared_buffer.py) - training: CudaMpsCliError -> CudaMpsError; TensorNanGuard -> NanGuard; move build_g1_flashsac_mjwarp_command to scripts/benchmark/torch_env/ g1_flashsac_soak.py - tasks: drop Tensor prefix from motion-tracking common runtime pieces (TensorResetPlan -> ResetMasks); Go2TensorParity* -> Go2Parity*; manager term classes moved to CamelCase per the function=snake_case / class=CamelCase convention (Hydra YAMLs updated) - base: BackendAdapter -> EnvConfigAdapter; apply_env_cpu_runtime -> apply_cpu_confinement; demo._mxpython_executable -> _motrix_python_executable - terrains: hf_pyramid_slope(_inv) presets -> pyramid_slope(_inv); utils.py -> heightfield_utils.py Validation: make check; make test (2677 passed, 60 skipped).
Rename privately-named contract members that are consumed across module boundaries so the public name is the only spelling, without changing any protocol semantics, timing, or numerics: - unilab.managers._types -> unilab.managers.types (git mv; all importers) - EntityScene._tensor_read_plan -> scene.read_plan; env tensor reset bound attributes lose their underscore prefix; Entity._root_body_name -> root_body_name (EntityData internals stay private) - envs/mdp/observations helpers -> quat_apply_inverse, require_read_plan, root_body_view, joint_view, world_to_body_vector (added to __all__) - locomotion common manager_terms _command/_real -> require_command/ require_real - base/variants: build_fixed_variant_plan / require_fixed_variant_support - scripts/play_interactive: build_play_args / compose_interactive_config / parse_interactive_cli - utils/checkpoint: TEST_LOG_ROOT_ENV / normalize_load_run - rl/runtime/settings: validated_positive_int - manager hooks __call_reset__ -> reset_scoped, _update_command_reset -> update_command_reset - visualization/playback: drop the unused private re-export alias Out of scope per issue: remaining EntityScene/EntityData private members, _SUPPORTED_SIM_BACKENDS, _resolve_backend_entity_contract, and module-internal privates (#2440/#2442). Adds tests/architecture/test_private_name_public_promotion.py to guard the retired names against reintroduction. Validation: - make check (ruff format/fix, mypy, pyright): all green - make test (pytest -m 'not slow'): 2680 passed, 60 skipped
…tocol-promotion # Conflicts: # src/unilab/training/run.py # src/unilab/utils/checkpoint.py
…s-stutter # Conflicts: # tests/rl/algos/test_sac_compile.py
Reset lifecycle hooks converge on the reset family: EventManager.apply_reset becomes dispatch_reset, CommandManager.compute_reset loses its dead dt and becomes refresh_reset alongside the term-side update_command_reset hook, and the dead CurriculumManager.compute_reset forwarder is removed (the env calls compute(reset_mask) directly). ResetOwner reset_transaction/reset_committed and Recorder record_pre_reset/record_post_reset stay: they name distinct transaction phases, not the same hook. Construction verbs in rl/runtime unify on build_* (make_device_timer, create_error_pipe, make_offpolicy_warmup_batch); host-side memory estimators gain the host_ infix and the available-memory getters share one word order. Play entrypoints name algorithms (play_rsl_rl -> play_ppo), the two Motrix viewer loops converge into visualization.playback.run_native_viewer_play_loop, and apply_appo_runtime_flags drops its dead cfg parameter. Serialization verbs unify on to_dict() for the CUDA MPS/process-sharing dataclasses, with the duplicated GPU-UUID canonicalizers extracted into the public canonicalize_gpu_uuid (display form stays GPU-<id>; the comparison token is case/dash-insensitive). Rename leftovers land: [dp_launcher] -> [launcher], reject_removed_inference_request_timeout -> validate_no_inference_request_timeout, off_policy_collector_fn -> offpolicy_collector_fn. rl/algos gain verbs: compute_vtrace_advantages, sample_biased_replay_indices, build_builtin/custom_actor_semantics, SACCritic.expected_value. Small items: update_mask -> update_masked, support_sim_backend -> supports_sim_backend, OnPlaybackFrameFn -> PlaybackFrameCallback, the CommandType error message now says CommandTerm, and recorder docstrings reference reset_mask. Validation: make check (ruff/mypy/pyright clean), make test (2678 passed, 60 skipped), docs check (20 passed), benchmark smoke (34/34 + 35/35). test_train_scripts.py slow lane shows the same 5 pre-existing local environment failures as the baseline.
…cle-consistency refactor!: unify verbs and lifecycle hook naming (#2443)
…#2444) - unisim-core 1.9.0 -> 2.0.0 in pyproject.toml and pyproject.rocm.toml; regenerate uv.lock and uv.rocm.lock (dual-track). - Adapt UniLab call sites to the unisim 2.0.0 naming: PackedResetTransaction, MocapPoseBinding/RootStateLayout/SensorView/PlayRenderPlan, bind_* cold-path verbs (bind_packed_reset/bind_host_bridge_io/bind_height_scanner/bind_renderer), get_tensor_execution(), torch_device_matches/validate_torch_device, get_default_geom_sizes(), unisim.backend.playback and motrix.camera modules, prefix-free adapter helpers. - Update en/zh_CN docs and tests to the new names; no aliases kept. - Record the #2434 API naming rules in AGENTS.md (decision D1).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Roadmap #2434 收尾:API 命名规范化 + unisim-core 2.0.0 集成
Closes #2434.
交付内容
API 命名审计(8 通道并行只读审计)发现的问题已全部落地,共 7 个子 PR 合入本集成分支:
skip_scene_reset、reset_root_state_uniform_fused、PlaybackConfig)+ 过期文档env_origins、commit_tensor、ManagerRng等)dof_armature)managers/types.py、read_plan、reset_scoped等)resolution.py、objectives.py、EnvConfigAdapter等)reset(mask)一族、build_*、to_dict())本分支在子 PR 之上的增量提交(42cb92d0):
pyproject.toml/pyproject.rocm.toml:unisim-core==1.9.0→==2.0.0;uv.lock与uv.rocm.lock同步重新生成PackedResetTransaction、MocapPoseBinding/RootStateLayout/SensorView/PlayRenderPlan、bind_*冷路径动词(bind_packed_reset/bind_host_bridge_io/bind_height_scanner/bind_renderer)、get_tensor_execution()、torch_device_matches/validate_torch_device、get_default_geom_sizes()、unisim.backend.playback与unisim.backend.motrix.camera模块迁移、去引擎前缀的适配器函数AGENTS.md新增 "API naming rules" 一节([Roadmap] API 命名规范化:清理迁移期残留限定词、平行 API 与私有协议泄漏 #2434 决策 D1,共 6 条)影响面
refactor!/chore!):全部按 [Roadmap] API 命名规范化:清理迁移期残留限定词、平行 API 与私有协议泄漏 #2434 决策一次性切齐,不留别名、不留兼容回退;owner YAML 已随子 PR 同步验证(最终 head 42cb92d 本地执行)
make check:ruff + mypy + pyright 全过make test:2678 passed, 60 skipped, 361 deselected (slow)make test-all(check + test-cov + benchmark smoke):exit 0;benchmark 冒烟 module-mode 34/34、script-mode 35/35uv run pytest tests/scripts/test_check_docs.py -q:20 passed备注