Skip to content

EventManager reset rejects documented list environment IDs #7975

Closed as not planned

Description

@dvasquezlopez

Specula found this at commit
c1fb8f3c33cbee4303ecb61d4d93a168f5e1ddfe. EventManager.apply() documents
env_ids as Sequence[int]. For reset terms with a positive
min_step_count_between_reset, it Boolean-indexes that sequence with a tensor.
Python lists and tuples do not support that operation, so reset raises before
the event runs.

Current sequence

T0: The caller applies a reset event with env_ids=[0, 2].
T1: The positive reset interval produces a tensor mask.
T2: EventManager uses that tensor to index the Python list.
T3: List indexing raises TypeError before the event runs.

Proposed sequence

T0: The caller applies a reset event with a documented sequence of environment IDs.
T1: EventManager normalizes the sequence to an integer tensor.
T2: It applies the reset interval mask to that tensor.
T3: The event runs for the selected environments.

An exact-method witness produced TypeError and an empty event trace. It used
NumPy buffers rather than a full Isaac Lab runtime; the failing list-indexing
operation is backend-independent.

The proposed fix normalizes supplied sequences to an integer tensor before
applying the mask. Regression coverage should exercise list, tuple, tensor, and
None inputs with zero and positive trigger intervals.

@kellyguo11 was detected as the most likely owner from the core CODEOWNERS
rule and blame. Please feel free to assign this to someone else if another owner
is closer to the code.

Activity

  1. ooctipus commented on Sep 26, 2026

    @ooctipus
    Collaborator

    Superseded by the reset selector contract in #8030 (merged). EventManager.apply(mode="reset", ...) is now documented to accept a slice or one-dimensional int32/int64 indices on the environment device; Python lists/tuples are outside that contract, so the "documented list IDs" premise no longer holds. Callers with a list should pass torch.tensor(ids, device=env.device), or a slice.

  2. self-assigned this
    on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions