Online adaptation advances observation history multiple times per policy query

オープン
#66 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@sylvesterkaczmarek がすでに取り組んでいます。

2026年10月30日 から。

  • #67 @sylvesterkaczmarek による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python, pytorch

調査の方向性

Start with _prepare, embed_for_buffer, propose_noise, act, and invert in rho/online/adaptation.py, then trace the call sequence in environments/metaworld/online_adapt.py’s run_episode. Reproduce the two-frame example and inspect how history and padding change across helper calls. Done when history advances once per query, inversion uses that query’s snapshot, episode resets clear history, and regression coverage exercises the listed rollout cases.

索引モデルが issue の本文から書いたものです。

説明

Problem

A single policy query in environments/metaworld/online_adapt.py calls embed_for_buffer(chunk_obs), optionally propose_noise(chunk_obs), and then act(chunk_obs, noise). Each path calls PolicyInterface.process_observation(), which appends the observation to its temporal queues. Finalizing a corrected action chunk calls invert(chunk_obs, ...), which appends the same starting observation again.

Consequently, observation history represents helper calls rather than distinct incoming observations. The conditioning used to collect a noise-policy training example can differ from the conditioning used to generate or invert its action chunk. Padding masks can also claim that an incomplete history is fully populated.

Affected code at 148bb1ae75b92a1162172ea36d8e5ceb830ceebb:

  • rho/online/adaptation.py: _prepare, embed_for_buffer, propose_noise, act, and invert
  • environments/metaworld/online_adapt.py: run_episode

Reproduction

Use a policy with observation deltas [-2, -1, 0], identity input transforms, and successive single-frame observations with values 1 and 2. For each query, follow the rollout's sequence:

embedding = adapter.embed_for_buffer(obs)
noise = adapter.propose_noise(obs)
actions = adapter.act(obs, noise)

On the second query, the model should see history [1, 1, 2] and padding mask [True, False, False]. It instead sees [2, 2, 2] with [False, False, False]. The first query's padding is already wrong after the repeated insertions.

This was reproduced through the actual run_episode() and PolicyInterface using a deterministic local environment and a lightweight policy, without model downloads or physical hardware. The Gaussian-noise path is also affected: it still calls both embed_for_buffer() and act(). Inversion of corrected chunks adds another history update.

The rollout also resets the environment without resetting PolicyInterface, so multi-step history can cross episode boundaries. Single-frame policies are unaffected by this particular history-ordering failure. This report does not establish an error in any published benchmark result.

Proposed fix

Prepare one explicit observation snapshot per query, advancing the history once. Reuse its transformed inputs for embedding, noise proposal, and action generation. Retain its raw, remapped history separately so executed physical actions can be normalized against the original query state during inversion, without advancing the queues or consulting a later query's history.

Reset the interface at episode boundaries. Add regression coverage for real rollout call sequences, Gaussian and learned noise, corrected and uncorrected chunks, history padding, repeated helper calls, consecutive multi-frame observations, delayed inversion, and reused environment buffers.

主要言語
Python
スター
38
フォーク
6
平均マージ
2日 9時間
マージ済み PR(30日)
20

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/rhobotics のほかの issue

microsoft/rhobotics の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。