lit_sb3.vec_env.vec_monitor
source module lit_sb3.vec_env.vec_monitor
Classes
-
VecMonitor — A vectorized monitor wrapper for vectorized Gym environments,.
source class VecMonitor(venv: VecEnv, filename: str | None = None, info_keywords: tuple[str, ...] = ())
Bases : VecEnvWrapper
A vectorized monitor wrapper for vectorized Gym environments,.
it is used to record the episode reward, length, time and other data.
Some environments like openai/procgen <https://github.com/openai/procgen>_
or gym3 <https://github.com/openai/gym3>_ directly initialize the
vectorized environments, without giving us a chance to use the Monitor
wrapper. So this class simply does the job of the Monitor wrapper on
a vectorized level.
Parameters
-
venv : VecEnv — The vectorized environment
-
filename : str | None — the location to save a log file, can be None for no log
-
info_keywords : tuple[str, ...] — extra information to log, from the information return of env.step()
Methods
source method VecMonitor.reset() → VecEnvObs
source method VecMonitor.step_wait() → VecEnvStepReturn
source method VecMonitor.close() → None