WrapperFactory

class maze.core.wrappers.wrapper_factory.WrapperFactory(*args, **kwds)

Handles dynamic registration of Wrapper sub-classes.

classmethod wrap_from_config(env: T, wrapper_config: Union[List[Union[None, Mapping[str, Any], Any]], Mapping[Union[str, Type], Union[None, Mapping[str, Any], Any]]]) → Union[maze.core.wrappers.wrapper.Wrapper, T]

Wraps environment in wrappers specified in wrapper_config.

Parameters
  • env – Environment to wrap.

  • wrapper_config – Wrapper specification.

Returns

Wrapped environment of type Wrapper.