Skip to content

[BUG] BatchedEnv crashes when EnvBase has non-empty batch_size #773

@matteobettini

Description

@matteobettini

Describe the bug

In the function get_metadata() of _BatchedEnv the tensordict expand method is called in a wrong manner:

self.meta_data = get_env_metadata(
                create_env_fn[0], create_env_kwargs[0]
            ).expand(self.num_workers)

As per docs, expand should be called with an argument which is the concatenation of the new dims to the old dims

To Reproduce

Create a ParallelEnv from a BaseEnv with non-empy batch_size

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