ExportGifWrapper¶
- class maze.core.wrappers.export_gif_wrapper.ExportGifWrapper(env: MazeEnv, export: bool, duration: float)¶
Dumps step renderings of environments as .gif files.
Make sure to activate this only for rollouts and disable it during training (e.g. set export=False). Otherwise it will dump a lot off rollout GIFs to your disk.
To convert the GIF into a mp4 video run: ffmpeg -r 1 -i <file-path>.gif -movflags faststart -pix_fmt yuv420p -vf “scale=trunc(iw/2)*2:trunc(ih/2)*2” <file-path>.mp4
- Parameters:
env – The environment to wrap.
duration – Duration in seconds between consecutive image frames.
export – Only if set to True a GIF is exported.
- clone_from(env: ExportGifWrapper) None¶
(overrides
SimulatedEnvMixin)implementation of
SimulatedEnvMixin.