Skip to content

fix: clear stale final observation mask - #132

Merged
TATP-233 merged 1 commit into
mainfrom
fix/final-observation-mask
Apr 9, 2026
Merged

TATP-233 merged 1 commit into
mainfrom
fix/final-observation-mask

Conversation

@TATP-233

@TATP-233 TATP-233 commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • clear state.info["_final_observation"] at the start of each NpEnv.step() so it behaves as a per-step event mask
  • keep terminal final_observation capture in _reset_done_envs() unchanged for envs that actually finish on the current step
  • add regression tests for the stale-mask cases after init_state() and after a subsequent terminal step

Linked Work

Validation

  • make check
  • uv run pytest -m "not slow"
  • Additional task-specific validation listed below

Commands actually run:

UV_CACHE_DIR=.uv-cache uv run --no-sync pytest tests/base/test_np_env.py
UV_CACHE_DIR=.uv-cache uv run --no-sync ruff check src/unilab/base/np_env.py tests/base/test_np_env.py
UV_CACHE_DIR=.uv-cache uv run --no-sync ruff format --check src/unilab/base/np_env.py tests/base/test_np_env.py

Impact

  • Backend impact: both
  • Platform impact: both
  • Training effect expected: yes

Artifacts

  • W&B:
  • benchmark result:
  • video / screenshot:
  • ONNX / checkpoint:

Checklist

  • Added or updated tests where needed
  • Updated docs if behavior or workflow changed
  • Linked the driving issue
  • Noted any follow-up work explicitly

Follow-up work: none.

@TATP-233
TATP-233 merged commit 38a0ae2 into main Apr 9, 2026
5 checks passed
@TATP-233
TATP-233 deleted the fix/final-observation-mask branch April 9, 2026 15:24
TATP-233 added a commit that referenced this pull request May 4, 2026
fix: clear stale final observation mask
TATP-233 added a commit that referenced this pull request May 30, 2026
fix: clear stale final observation mask
TATP-233 added a commit that referenced this pull request Sep 4, 2026
fix: clear stale final observation mask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: _final_observation can stay stale across non-terminal NpEnv.step calls

1 participant