To save a video of a rollout when running rllib locally, I’ve added --video-dir outputs to the argument of rollout.py, so it goes into the if video_dir: condition of rollouts.py and creates a Monitor wrapper, and does call render() many times, but still it doesn’t save any videos in the dir outputs.
I’ve also tried to render things directly using the Procgen Wrapper env without using ray, but it still doesn’t render, and now I’m trying to render things directly with procgen, and I’m still not succeeding (cf. my comment on the procgen repo here)
Note: it does save some files in outputs (like openaigym.episode_batch.0.27441.stats.json or openaigym.manifest.0.27441.manifest.json), just not videos.
Note2: I’ve upgraded the procgen version to 0.10.3 and it still doesn’t save any video when adding --video-dir outputs.
I also have the same issue. I tried env = gym.make(‘procgen:procgen-coinrun-v0’, render_mode=‘rgb_array’)
and wrap it with gym Monitor but still no video (it works with CartPole-v0 though). Anything I am missing?
@jyotish With render_mode=‘rgb_array’ + correct version of procgen and gym3 render returns None.
@xiaocheng_tang We might need to use gym3’s VideoRecorderWrapper instead of a Monitor if we’re using gym3 environments, because when we passrender_mode=‘rgb_array’ it creates some vectorized observations (different from simple gym).
I’m still a bit uncertain about if we should use gym or gym3 in the rollouts.py file. Really seems like Monitor is for old gym environments.