question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Environment reset is broken

See original GitHub issue

Bug Description

The environment does not reset properly when flow.core.experiment.Experiment.run is called with num_runs > 1.

Bug Reproduce

File in which the bug occurred: examples/sumo/bottlenecks.py

The exact command that you did run that caused the bug: python examples/sumo/bottlenecks.py

Output Log

(traffic-lights) ➜  flow git:(simulation) ✗ python examples/sumo/bottlenecks.py
/Users/brandon/projects/forks/flow/flow/utils/flow_warnings.py:20: UserWarning: The attribute vehsPerHour in InFlows is deprecated, use vehs_per_hour instead.
  dep_from, obj.__class__.__name__, dep_to))
/Users/brandon/projects/forks/flow/flow/utils/flow_warnings.py:20: UserWarning: The attribute departLane in InFlows is deprecated, use depart_lane instead.
  dep_from, obj.__class__.__name__, dep_to))
/Users/brandon/projects/forks/flow/flow/utils/flow_warnings.py:20: UserWarning: The attribute departSpeed in InFlows is deprecated, use depart_speed instead.
  dep_from, obj.__class__.__name__, dep_to))
Loading configuration... done.
Success.
 Retrying in 1 seconds
Could not connect to TraCI server at localhost:53921 [Errno 61] Connection refused
 Retrying in 2 seconds
Could not connect to TraCI server at localhost:53921 [Errno 61] Connection refused
 Retrying in 3 seconds
Could not connect to TraCI server at localhost:53921 [Errno 61] Connection refused
 Retrying in 4 seconds
Loading configuration... done.
**********************************************************
**********************************************************
**********************************************************
WARNING: Inflows will cause computational performance to
significantly decrease after large number of rollouts. In
order to avoid this, set SumoParams(restart_instance=True).
**********************************************************
**********************************************************
**********************************************************
Round 0, return: 847.0800000000135
**********************************************************
**********************************************************
**********************************************************
WARNING: Inflows will cause computational performance to
significantly decrease after large number of rollouts. In
order to avoid this, set SumoParams(restart_instance=True).
**********************************************************
**********************************************************
**********************************************************
Traceback (most recent call last):
  File "examples/sumo/bottlenecks.py", line 202, in <module>
    exp.run(5, 1000)
  File "examples/sumo/bottlenecks.py", line 57, in run
    state = self.env.reset()
  File "/Users/brandon/projects/forks/flow/flow/envs/base_env.py", line 496, in reset
    self.k.update(reset=True)
  File "/Users/brandon/projects/forks/flow/flow/core/kernel/kernel.py", line 100, in update
    self.vehicle.update(reset)
  File "/Users/brandon/projects/forks/flow/flow/core/kernel/vehicle/traci.py", line 138, in update
    if vehicle_obs[veh_id] is None:
KeyError: 'flow_00.231'

Versions

  • OS: ? macOS 10.14.6
  • Flow version: ? 0.4.1.dev
  • Flow commit number: ? 2294c947b441471a968a3f26d95a52d56dafd368

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kevin-thankyou-lincommented, Oct 7, 2019

Hi @bmwilly the issue doesn’t exist on master, so we recommend that you could update to master.

1reaction
eugenevinitskycommented, Aug 17, 2019

Hmmm, this is bad. Lets see if we can reproduce this and figure this out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Windows 10 Reset Failed (6 Effective Ways)
5 possible solutions to Windows 10 reset failed · Solution 1: Re-enable Windows recovery environment · Solution 2: Perform SFC command · Solution...
Read more >
Fix Could not Find the Recovery Environment Error in 3 Steps
Broken or missing media disk can stop you from refreshing your PC ... Windows 10 factory reset could not find the recovery environment...
Read more >
Top 3 Solutions to Could Not Find the Recovery Environment
Solution 1. Use Windows Installation or Recovery Media ; Repair your computer > ; Choose an option > ; Troubleshoot > ; Reset...
Read more >
Windows reset broke my computer - Microsoft Community
Do this three or more times. Windows will start in the Recovery Environment and from there you can access System Repair, Safe Mode,...
Read more >
Microsoft shares fix for broken Windows 10 'Reset this PC ...
Open an elevated command prompt. · Type the following command, and then press Enter: dism /online /cleanup-image /restorehealth · Reboot your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found