Skip to content

[BUG] check_env_specs() problems with nested keys #1268

@matteobettini

Description

@matteobettini

This line fails with nested specs https://github.com/pytorch/rl/blob/main/torchrl/envs/utils.py#L346

This is because it will call _check_isin with value agents, which is a key present in all specs.
So what happens is that _check_isin will always trigger elif key in input_spec["_action_spec"].keys(True): even when the agents key does not contain action subkeys but just observations.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions