mani_skill.utils.wrappers.gymnasium =================================== .. py:module:: mani_skill.utils.wrappers.gymnasium Classes ------- .. autoapisummary:: mani_skill.utils.wrappers.gymnasium.CPUGymWrapper Module Contents --------------- .. py:class:: CPUGymWrapper(env, ignore_terminations = False, record_metrics = False) Bases: :py:obj:`gymnasium.Wrapper` This wrapper wraps any maniskill env created via gym.make to ensure the outputs of env.render, env.reset, env.step are all numpy arrays and are not batched. Essentially ensuring the environment conforms entirely to the standard gymnasium API https://gymnasium.farama.org/api/env/. The wrapper also optionally records standardized evaluation metrics like return and success. This wrapper should generally be applied after all other wrappers as most wrappers for ManiSkill assume data returned is a batched torch tensor :param env: The environment to wrap. :type env: gym.Env :param ignore_terminations: If True, the environment will ignore termination signals and continue running until truncation. Default is False. :type ignore_terminations: bool :param record_metrics: If True, the returned info objects will contain the metrics: return, length, success_once, success_at_end, fail_once, fail_at_end. success/fail metrics are recorded only when the environment has success/fail criteria. success/fail_at_end are recorded only when ignore_terminations is True. :type record_metrics: bool .. py:method:: render() Uses the :meth:`render` of the :attr:`env` that can be overwritten to change the returned data. .. py:method:: reset(*, seed=None, options=None) Uses the :meth:`reset` of the :attr:`env` that can be overwritten to change the returned data. .. py:method:: step(action) Uses the :meth:`step` of the :attr:`env` that can be overwritten to change the returned data. .. py:attribute:: action_space Return the :attr:`Env` :attr:`action_space` unless overwritten then the wrapper :attr:`action_space` is used. .. py:property:: base_env :type: mani_skill.envs.sapien_env.BaseEnv .. py:attribute:: ignore_terminations :value: False .. py:attribute:: observation_space Return the :attr:`Env` :attr:`observation_space` unless overwritten then the wrapper :attr:`observation_space` is used. .. py:attribute:: record_metrics :value: False