hive.envs.wrappers.gym_wrappers module

class hive.envs.wrappers.gym_wrappers.FlattenWrapper(env)[source]

Bases: ObservationWrapper

Flatten the observation to one dimensional vector.

Wraps an environment to allow a modular transformation of the step() and reset() methods.

Parameters
  • env – The environment to wrap

  • new_step_api – Whether the wrapper’s step method will output in new or old step API

observation(obs)[source]

Returns a modified observation.

class hive.envs.wrappers.gym_wrappers.PermuteImageWrapper(env)[source]

Bases: ObservationWrapper

Changes the image format from HWC to CHW

Wraps an environment to allow a modular transformation of the step() and reset() methods.

Parameters
  • env – The environment to wrap

  • new_step_api – Whether the wrapper’s step method will output in new or old step API

observation(obs)[source]

Returns a modified observation.