We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2397a15 + fb17351 commit 32a0eccCopy full SHA for 32a0ecc
flow/visualize/visualizer_rllib.py
@@ -160,7 +160,8 @@ def visualizer_rllib(args):
160
checkpoint = checkpoint + '/checkpoint-' + args.checkpoint_num
161
agent.restore(checkpoint)
162
163
- if hasattr(agent, "local_evaluator") and os.environ["TEST_FLAG"] != 'True':
+ if hasattr(agent, "local_evaluator") and \
164
+ os.environ.get("TEST_FLAG") != 'True':
165
env = agent.local_evaluator.env
166
else:
167
env = gym.make(env_name)
@@ -193,6 +194,9 @@ def visualizer_rllib(args):
193
194
195
use_lstm = False
196
197
+ env.restart_simulation(
198
+ sim_params=sim_params, render=sim_params.render)
199
+
200
final_outflows = []
201
mean_speed = []
202
for i in range(args.num_rollouts):
0 commit comments