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
- 派生
- 765
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 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
-
customer-reported
难度 2/5 1-3 小时 新手友好度 68/100
Azure/azure-cli#34150 · 1 条评论 ·
维护者通常 1 天内回复
-
community-request
难度 1/5 1 小时以内 新手友好度 95/100
NVIDIA-NeMo/Curator#2464 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
WeblateOrg/translation-finder#1099 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
trezor/trezor-firmware#7997 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复