mani_skill.utils.wrappers.cached_reset#
Classes#
Cached reset wrapper for ManiSkill3 environments. Caching resets allows you to skip slower parts of the reset function call and boost environment FPS as a result. |
|
Module Contents#
- class mani_skill.utils.wrappers.cached_reset.CachedResetWrapper(env, reset_to_env_states=None, config=CachedResetsConfig())[source]#
Bases:
gymnasium.WrapperCached reset wrapper for ManiSkill3 environments. Caching resets allows you to skip slower parts of the reset function call and boost environment FPS as a result.
- Parameters:
env (gymnasium.Env) – The environment to wrap.
reset_to_env_states (Optional[dict]) – A dictionary with keys “env_states” and optionally “obs”. “env_states” is a dictionary of environment states to reset to. “obs” contains the corresponding observations generated at those env states. If reset_to_env_states is not provided, the wrapper will sample reset states from the environment using the given seed.
config (Union[CachedResetsConfig, dict]) – A dictionary or a CachedResetsConfig object that contains the configuration for the cached resets.
- reset(*args, seed=None, options=None, **kwargs)[source]#
Uses the
reset()of theenvthat can be overwritten to change the returned data.- Parameters:
seed (Optional[Union[int, list[int]]]) –
options (Optional[dict]) –
- property base_env: mani_skill.envs.sapien_env.BaseEnv[source]#
- Return type:
- class mani_skill.utils.wrappers.cached_reset.CachedResetsConfig[source]#
- device: mani_skill.utils.structs.types.Device | None = None[source]#
The device to cache the reset states on. If none it will use the base environment’s device.