Skip to content

Commit

Permalink
Use gym.wrappers.RecordVideo
Browse files Browse the repository at this point in the history
  • Loading branch information
vwxyzjn committed May 13, 2022
1 parent b1fa9dc commit 42dd5c5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions jaxrl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from gym.wrappers.pixel_observation import PixelObservationWrapper

from jaxrl import wrappers
from jaxrl.wrappers import VideoRecorder


def make_env(env_name: str,
Expand Down Expand Up @@ -44,7 +43,7 @@ def make_env(env_name: str,
env = RescaleAction(env, -1.0, 1.0)

if save_folder is not None:
env = VideoRecorder(env, save_folder=save_folder)
env = gym.wrappers.RecordVideo(env, save_folder)

if from_pixels:
if env_name in env_ids:
Expand Down

0 comments on commit 42dd5c5

Please sign in to comment.