Skip to content

Commit

Permalink
Check gym version for roboschool
Browse files Browse the repository at this point in the history
  • Loading branch information
muupan committed Feb 12, 2020
1 parent c5d36ac commit 44bc2e3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/atlas/train_soft_actor_critic_atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ def concat_obs_and_action(obs, action):

def make_env(args, seed, test):
if args.env.startswith('Roboschool'):
# Check gym version because roboschool does not work with gym>=0.15.6
from distutils.version import StrictVersion
gym_version = StrictVersion(gym.__version__)
if gym_version >= StrictVersion('0.15.6'):
raise RuntimeError('roboschool does not work with gym>=0.15.6')
import roboschool # NOQA
env = gym.make(args.env)
# Unwrap TimiLimit wrapper
Expand Down

0 comments on commit 44bc2e3

Please sign in to comment.