EverythingToInfoWrapper

class EverythingToInfoWrapper(env)[source]

Bases: Wrapper

Moves all transition information into the info dict for unified data access.

Adds observation, reward, terminated, truncated, action, and step_idx to info. Optionally tracks environment variations when specified in reset options.

Parameters:

env – The Gymnasium environment to wrap.

Info Keys Added:
  • observation (or dict keys if obs is dict): Current observation.

  • reward: Reward value (NaN after reset).

  • terminated: Episode termination flag.

  • truncated: Episode truncation flag.

  • action: Action taken (NaN sample after reset).

  • step_idx: Current step counter.

  • variation.{key}: Variation values if requested via reset options.

Note

Pass options={“variation”: [“key1”, “key2”]} or [“all”] to reset() to track variations.

reset(*args, **kwargs)[source]

Uses the reset() of the env that can be overwritten to change the returned data.

step(action)[source]

Uses the step() of the env that can be overwritten to change the returned data.