Initial observation padding changes when source arrays are reused
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 85/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- numpy, python
研究方向
從 dm_control/composer/observation/obs_buffer.py 和 Buffer 的 padding 路徑開始;先執行 issue 的 NumPy reproduction。檢查現有對一般插入 observation 的處理,以及報告中描述的 updater 路徑,接著驗證 source array 或 simulation state 變更後 initial padding 仍維持不變,同時 ordering、zero padding、sizes 和後續 observations 仍保持完整。
由索引模型根據 Issue 內容生成。
描述
Reproduction
Initial-value observation padding retains a reference to the caller's array. Reusing that array changes the apparent initial observations, although normally inserted observations are copied.
import numpy as np
from dm_control.composer.observation.obs_buffer import Buffer
source = np.array([3., 7.])
buffer = Buffer(3, source.shape, source.dtype, pad_with_initial_value=True)
buffer.insert(timestamp=0, delay=0, value=source)
source[:] = -1
print(buffer.read(0))
# [[-1., -1.], [-1., -1.], [3., 7.]]
# Expected three copies of [3., 7.].
With a delayed first sample, all padding entries can change before that sample arrives. The same behavior occurs through the actual observation Updater when a Generic observable exposes physics.data.qpos: advancing MuJoCo rewrites padding intended to represent the initial state, including when mean aggregation is used.
Expected behavior
Snapshot the initial value before using it to fill the padding entries, consistently with regular inserted observations. Preserve arrival ordering, zero padding, buffer sizes, source data and subsequent observations.
Reproduced on main at a04e3e4cf56c12117d2294bb090f9acec21e5c67. The regression uses real buffer/updater code and a minimal native MuJoCo simulation, without rendering or trained agents.
- 主要語言
- Python
- 星號
- 4.7k
- 分支
- 768
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
google-deepmind/dm_control 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 75/100
google-deepmind/dm_control#560 ·
-
難度 3/5 1-2 天 新手友好度 74/100
google-deepmind/dm_control#557 ·
-
難度 3/5 1-2 天 新手友好度 76/100
google-deepmind/dm_control#552 ·
-
難度 3/5 1-2 天 新手友好度 45/100
google-deepmind/dm_control#540 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 55/100
google-deepmind/dm_control#537 · 1 則留言 ·
查看 google-deepmind/dm_control 的全部 Issue
相似的 Issue
-
namespace operations
難度 1/5 1 小時以內 新手友好度 82/100
EclipseFdn/open-vsx.org#13573 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
collective/icalendar#1854 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
rancher/rancher-ai-agent#412 ·
維護者通常 6 天內回覆
-
難度 2/5 1-3 小時 新手友好度 84/100
TUDelftGeodesy/DePSI#134 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
HenriquesLab/rxiv-maker#335 ·