This repository was archived by the owner on Jul 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ def standard_atari_env_spec(env):
54
54
env_lambda = lambda : gym .make (env )
55
55
if callable (env ):
56
56
env_lambda = env
57
- assert env is not None , "Unknown specification of environment"
57
+ assert env_lambda is not None , "Unknown specification of environment"
58
58
59
59
return tf .contrib .training .HParams (
60
60
env_lambda = env_lambda , wrappers = standard_wrappers , simulated_env = False )
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ def simple_gym_spec(env):
130
130
env_lambda = lambda : gym .make (env )
131
131
if callable (env ):
132
132
env_lambda = env
133
- assert env is not None , "Unknown specification of environment"
133
+ assert env_lambda is not None , "Unknown specification of environment"
134
134
135
135
return tf .contrib .training .HParams (env_lambda = env_lambda ,
136
136
wrappers = standard_wrappers ,
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def test_no_crash_cartpole(self):
45
45
TrainTest .test_config )
46
46
47
47
hparams .add_hparam (
48
- "environment_spec" , gym_problems . standard_atari_env_spec ("CartPole-v0" ))
48
+ "environment_spec" , rl_models . simple_gym_spec ("CartPole-v0" ))
49
49
rl_trainer_lib .train (hparams )
50
50
51
51
# This test should successfully train pong.
You can’t perform that action at this time.
0 commit comments