perf(profiling): 临时逐 term profiling 埋点(#1293,#1292 完成后删除) - #1297
Merged
TATP-233 merged 3 commits intoAug 25, 2026
Merged
Conversation
…nagers (#1293) PROFILING_TEMP: opt-in via UNILAB_TERM_PROFILING=1, default off with a shared no-op context (one attribute check per call site). Covers observation (term func / post-processing / group concat, split by step|reset phase), reward, metrics, termination, event (all modes) and curriculum term loops. Stats reset per env instance so multi-case benchmarks stay isolated; atexit dumps the final case. TODO(#1292 cleanup): remove this module and all PROFILING_TEMP call sites once #1294/#1295/#1296 are complete.
Pre-existing staleness from the mjwarp wiring commit (77ca6dd); caught by make test-all's check_docs gate.
This was referenced Aug 25, 2026
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.
Part of #1292. Implements #1293 (profiling sub-issue; temporary instrumentation).
内容
src/unilab/utils/term_profiling.py:UNILAB_TERM_PROFILING=1开启,默认关闭(共享 no-op context,关闭时每挂点一次属性判断、零分配)。|step/|reset)、reward、metrics、termination、event(全 mode)、curriculum 的 term 循环;ManagerBasedRlEnv._load_managers按 case 重置统计,atexit dump 最后一个 case。PROFILING_TEMP (#1293, TODO: remove after #1292)标记,评估:Manager-based API 下用 Numba 加速 collector 后处理与 reset 的可行性(基于 #932 复盘) #1292 优化完成后整体删除(见 perf(profiling): motion tracking update_state/reset_done 逐 term profiling(#1292 杠杆 1) #1293 顶部 TODO)。term_profiling(带 PROFILING_TEMP 注释);重新生成 support matrix(mjwarp 接线遗留的 stale,非本 PR 引入);ruff format 一处。Validation
make test-all本地通过(check + test-cov 2244 passed + benchmark smoke)。远程 CI 按本次工作流要求跳过等待。注意
dev/issue-1292-motion-tracking-manager-perf(评估:Manager-based API 下用 Numba 加速 collector 后处理与 reset 的可行性(基于 #932 复盘) #1292 开发分支),合入不关闭 issue;perf(profiling): motion tracking update_state/reset_done 逐 term profiling(#1292 杠杆 1) #1293 在 评估:Manager-based API 下用 Numba 加速 collector 后处理与 reset 的可行性(基于 #932 复盘) #1292 收尾、清理埋点后一并关闭。