Skip to content

Commit 32a0ecc

Browse files
Merge pull request #441 from kjang96/visualizer_fix
Minor fixes
2 parents 2397a15 + fb17351 commit 32a0ecc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flow/visualize/visualizer_rllib.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ def visualizer_rllib(args):
160160
checkpoint = checkpoint + '/checkpoint-' + args.checkpoint_num
161161
agent.restore(checkpoint)
162162

163-
if hasattr(agent, "local_evaluator") and os.environ["TEST_FLAG"] != 'True':
163+
if hasattr(agent, "local_evaluator") and \
164+
os.environ.get("TEST_FLAG") != 'True':
164165
env = agent.local_evaluator.env
165166
else:
166167
env = gym.make(env_name)
@@ -193,6 +194,9 @@ def visualizer_rllib(args):
193194
else:
194195
use_lstm = False
195196

197+
env.restart_simulation(
198+
sim_params=sim_params, render=sim_params.render)
199+
196200
final_outflows = []
197201
mean_speed = []
198202
for i in range(args.num_rollouts):

0 commit comments

Comments
 (0)