Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Initial observation padding changes when source arrays are reused

Đang mở Phù hợp với người mới
#559 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
numpy, python
Lĩnh vực
machine-learning

Hướng nghiên cứu

Bắt đầu với dm_control/composer/observation/obs_buffer.py và đường dẫn padding của Buffer; trước tiên hãy chạy bản tái hiện NumPy của issue. Kiểm tra cách xử lý hiện có đối với các observation được chèn thông thường và đường dẫn updater được mô tả trong báo cáo, sau đó xác minh rằng padding ban đầu vẫn không thay đổi sau khi source array hoặc simulation state thay đổi, trong khi thứ tự, zero padding, kích thước và các observation về sau vẫn nguyên vẹn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
4.7k
Fork
768
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google-deepmind/dm_control

Tất cả issue của google-deepmind/dm_control

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.