Skip to content

Commit

Permalink
Merge pull request #441 from kjang96/visualizer_fix
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
AboudyKreidieh committed Mar 7, 2019
2 parents 2397a15 + fb17351 commit 32a0ecc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flow/visualize/visualizer_rllib.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ def visualizer_rllib(args):
checkpoint = checkpoint + '/checkpoint-' + args.checkpoint_num
agent.restore(checkpoint)

if hasattr(agent, "local_evaluator") and os.environ["TEST_FLAG"] != 'True':
if hasattr(agent, "local_evaluator") and \
os.environ.get("TEST_FLAG") != 'True':
env = agent.local_evaluator.env
else:
env = gym.make(env_name)
Expand Down Expand Up @@ -193,6 +194,9 @@ def visualizer_rllib(args):
else:
use_lstm = False

env.restart_simulation(
sim_params=sim_params, render=sim_params.render)

final_outflows = []
mean_speed = []
for i in range(args.num_rollouts):
Expand Down

0 comments on commit 32a0ecc

Please sign in to comment.