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.