Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobettini committed Jul 27, 2024
1 parent c21c30b commit 5d66dbf
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions benchmarl/algorithms/iddpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def _get_policy_for_loss(
out_keys=[(group, "action")],
distribution_class=TanhDelta if self.use_tanh_mapping else Delta,
distribution_kwargs={
"low": self.action_spec[(group, "action")].space.low,
"high": self.action_spec[(group, "action")].space.high,
"min": self.action_spec[(group, "action")].space.low,
"max": self.action_spec[(group, "action")].space.high,
}
if self.use_tanh_mapping
else {},
Expand Down
4 changes: 2 additions & 2 deletions benchmarl/algorithms/ippo.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ def _get_policy_for_loss(
),
distribution_kwargs=(
{
"low": self.action_spec[(group, "action")].space.low,
"high": self.action_spec[(group, "action")].space.high,
"min": self.action_spec[(group, "action")].space.low,
"max": self.action_spec[(group, "action")].space.high,
}
if self.use_tanh_normal
else {}
Expand Down
4 changes: 2 additions & 2 deletions benchmarl/algorithms/isac.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ def _get_policy_for_loss(
if not self.use_tanh_normal
else TanhNormal,
distribution_kwargs={
"low": self.action_spec[(group, "action")].space.low,
"high": self.action_spec[(group, "action")].space.high,
"min": self.action_spec[(group, "action")].space.low,
"max": self.action_spec[(group, "action")].space.high,
}
if self.use_tanh_normal
else {},
Expand Down
4 changes: 2 additions & 2 deletions benchmarl/algorithms/maddpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def _get_policy_for_loss(
out_keys=[(group, "action")],
distribution_class=TanhDelta if self.use_tanh_mapping else Delta,
distribution_kwargs={
"low": self.action_spec[(group, "action")].space.low,
"high": self.action_spec[(group, "action")].space.high,
"min": self.action_spec[(group, "action")].space.low,
"max": self.action_spec[(group, "action")].space.high,
}
if self.use_tanh_mapping
else {},
Expand Down
4 changes: 2 additions & 2 deletions benchmarl/algorithms/mappo.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ def _get_policy_for_loss(
),
distribution_kwargs=(
{
"low": self.action_spec[(group, "action")].space.low,
"high": self.action_spec[(group, "action")].space.high,
"min": self.action_spec[(group, "action")].space.low,
"max": self.action_spec[(group, "action")].space.high,
}
if self.use_tanh_normal
else {}
Expand Down
4 changes: 2 additions & 2 deletions benchmarl/algorithms/masac.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ def _get_policy_for_loss(
if not self.use_tanh_normal
else TanhNormal,
distribution_kwargs={
"low": self.action_spec[(group, "action")].space.low,
"high": self.action_spec[(group, "action")].space.high,
"min": self.action_spec[(group, "action")].space.low,
"max": self.action_spec[(group, "action")].space.high,
}
if self.use_tanh_normal
else {},
Expand Down
2 changes: 1 addition & 1 deletion benchmarl/experiment/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def _grad_clip(self, optimizer: torch.optim.Optimizer) -> float:
def _evaluation_loop(self):
evaluation_start = time.time()
with set_exploration_type(
ExplorationType.DETERMINISTIC
ExplorationType.MODE
if self.config.evaluation_deterministic_actions
else ExplorationType.RANDOM
):
Expand Down

0 comments on commit 5d66dbf

Please sign in to comment.