sinergym.utils.common.unwrap_wrapper

sinergym.utils.common.unwrap_wrapper(env: gym.Env, wrapper_class: Type[gym.Wrapper]) gym.Wrapper | None

Retrieve a VecEnvWrapper object by recursively searching.

Parameters:
  • env – Environment to unwrap

  • wrapper_class – Wrapper to look for

Returns:

Environment unwrapped till wrapper_class if it has been wrapped with it