Skip to content

Commit 6840303

Browse files
committed
[Doc] Warn about missing individual resets in Gymnasium Vector wrapper
1 parent 55f49e3 commit 6840303

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vmas/simulator/environment/gym/gymnasium_vec.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# ProrokLab (https://www.proroklab.org/)
33
# All rights reserved.
44
import importlib
5+
6+
import warnings
57
from typing import Optional
68

79
import numpy as np
@@ -44,6 +46,12 @@ def __init__(
4446
)
4547
self.action_space = batch_space(self.single_action_space, n=self._num_envs)
4648
self.render_mode = render_mode
49+
warnings.warn(
50+
"The Gymnasium Vector wrapper currently does not have auto-resets or support partial resets."
51+
"We warn you that by using this class, individual environments will not be reset when they are done and you"
52+
"will only have access to global resets. We strongly suggest using the VMAS API unless your scenario does not implement"
53+
"the `done` function and thus all sub-environments are done at the same time."
54+
)
4755

4856
@property
4957
def unwrapped(self) -> Environment:

0 commit comments

Comments
 (0)