ray.rllib.algorithms.algorithm.Algorithm.validate_env#
- static Algorithm.validate_env(env: Any | gymnasium.Env, env_context: EnvContext) None [source]#
Env validator function for this Algorithm class.
Override this in child classes to define custom validation behavior.
- Parameters:
env – The (sub-)environment to validate. This is normally a single sub-environment (e.g. a gym.Env) within a vectorized setup.
env_context – The EnvContext to configure the environment.
- Raises:
Exception – in case something is wrong with the given environment.