flow-project / flow

Computational framework for reinforcement learning in traffic control
MIT License
1.04k stars 369 forks source link

Visualizer not working due to argparse #394

Closed kjang96 closed 5 years ago

kjang96 commented 5 years ago

Choose an option This is a:

Describe the issue I'm guessing this is an issue with argparse. The default value for args.render_mode is 'sumo-gui', yet the code doesn't hit the conditional case that sets sim_params.render = True. From the ipdb debugger, when you run p(args.render_mode), (all this is is a print function) it prints 'sumo-gui,' as expected. When you run args.render_mode, it gives you a Namespace object. It seems like this is why the condition args.render_mode == 'sumo_gui' isn't registering as True.

To Reproduce Leave empty if not applicable.

  1. visualizer_rllib.py
  2. python visualizer_rllib.py [arbitrary figure eight experiment ran for this specific purpose]

Expected behavior Running args.render_mode should return 'sumo-gui', or some valid string, rather than a Namespace object.

Screenshots If applicable, add screenshots to help explain your problem. Leave empty if not applicable.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

MouvementMondial commented 5 years ago

Argparse works. The argument has been overwritten. I have created a pull-request.