Skip to content

Commit

Permalink
[BugFix] Add missing break (#2322)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Jul 25, 2024
1 parent dd70b78 commit 94abb50
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,13 @@ def test_multiagent_mlp_init(
share_params=share_params,
depth=2,
)
for m in mlp.modules():
if isinstance(m, nn.Linear):
assert not isinstance(m.weight, nn.Parameter)
assert m.weight.device == torch.device("meta")
break
else:
raise RuntimeError("could not find a Linear module")
if n_agent_inputs is None:
n_agent_inputs = 6
td = self._get_mock_input_td(n_agents, n_agent_inputs, batch=batch)
Expand Down

0 comments on commit 94abb50

Please sign in to comment.