Skip to content

Commit dc77a5f

Browse files
committed
VMAS-1.4.3
1 parent 659c390 commit dc77a5f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

vmas/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"mpe_scenarios",
1919
]
2020

21-
__version__ = "1.4.2"
21+
__version__ = "1.4.3"
2222

2323
scenarios = sorted(
2424
[

vmas/simulator/environment/environment.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,19 @@ def step(self, actions: Union[List, Dict]):
278278

279279
def done(self):
280280
terminated = self.scenario.done().clone()
281+
281282
if self.max_steps is not None:
282283
truncated = self.steps >= self.max_steps
283284
else:
284-
truncated = torch.zeros_like(terminated)
285+
truncated = None
285286

286287
if self.terminated_truncated:
288+
if truncated is None:
289+
truncated = torch.zeros_like(terminated)
287290
return terminated, truncated
288291
else:
292+
if truncated is None:
293+
return terminated
289294
return terminated + truncated
290295

291296
def get_action_space(self):

0 commit comments

Comments
 (0)