Skip to content

Commit

Permalink
[Doc] Warn about missing individual resets in Gymnasium Vector wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobettini committed Oct 9, 2024
1 parent 55f49e3 commit 6840303
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vmas/simulator/environment/gym/gymnasium_vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# ProrokLab (https://www.proroklab.org/)
# All rights reserved.
import importlib

import warnings
from typing import Optional

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

@property
def unwrapped(self) -> Environment:
Expand Down

0 comments on commit 6840303

Please sign in to comment.