diff --git a/pl_bolts/models/rl/common/gym_wrappers.py b/pl_bolts/models/rl/common/gym_wrappers.py index 7451c80ce7..7af7cd6243 100644 --- a/pl_bolts/models/rl/common/gym_wrappers.py +++ b/pl_bolts/models/rl/common/gym_wrappers.py @@ -12,8 +12,8 @@ if _GYM_AVAILABLE: from gym import Wrapper, ObservationWrapper + from gym import make as gym_make import gym.spaces - import gym.make else: # pragma: no-cover warn_missing_pkg('gym') Wrapper = object @@ -204,7 +204,7 @@ def observation(self, obs): def make_environment(env_name): """Convert environment with wrappers""" - env = gym.make(env_name) + env = gym_make(env_name) env = MaxAndSkipEnv(env) env = FireResetEnv(env) env = ProcessFrame84(env)