EnsureGoalInfoWrapper
- class EnsureGoalInfoWrapper(env, check_reset, check_step: bool = False)[source]
Bases:
WrapperValidates that ‘goal’ key is present in info dict during reset and/or step.
Useful for goal-conditioned environments to ensure goal information is provided.
- Parameters:
env – The Gymnasium environment to wrap.
check_reset – If True, validates ‘goal’ key is in info after reset().
check_step – If True, validates ‘goal’ key is in info after step().
- Raises:
RuntimeError – If ‘goal’ key is missing when validation is enabled.