Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobettini authored and vmoens committed Oct 10, 2024
1 parent 205b83d commit b361a16
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions torchrl/envs/libs/pettingzoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,7 @@ def _make_group_specs(self, group_name: str, agent_names: List[str]):
n=2,
shape=group_action_spec["action"].shape
if not self.categorical_actions
else (
*group_action_spec["action"].shape,
group_action_spec["action"].space.n,
),
else group_action_spec["action"].to_one_hot_spec().shape,
dtype=torch.bool,
device=self.device,
)
Expand Down Expand Up @@ -494,7 +491,7 @@ def _init_env(self):
n=2,
shape=group_action_spec.shape
if not self.categorical_actions
else (*group_action_spec.shape, group_action_spec.space.n),
else group_action_spec.to_one_hot_spec().shape,
dtype=torch.bool,
device=self.device,
)
Expand Down

0 comments on commit b361a16

Please sign in to comment.