Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper shutdown of RemoteAgentBuffer after code crash #822

Merged
merged 2 commits into from
Jun 2, 2021

Conversation

Adaickalavan
Copy link
Member

When SMARTS crashes due to non-grpc related errors, incorrect attempts to close processes which are already closed throws unwanted grpc error messages. This is now rectified.

To verify try:

$ git checkout 2d6caf6f
$ python3.7 ./examples/single_agent.py ./scenarios/intersections/6lane --headless

The above test commit should crash without producing unwanted grpc error messages.

@Adaickalavan Adaickalavan requested a review from a team May 6, 2021 18:42
@Adaickalavan Adaickalavan self-assigned this May 6, 2021
Copy link
Contributor

@sah-huawei sah-huawei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly didn't look deeply enough into this to know whether this is ok, but I assume it is. My one concern is the zombie worker processes that are sometimes left behind by make test. I'm hoping this doesn't mean we will always leave behind zombies. Assuming not, I'm fine with this.

@Adaickalavan
Copy link
Member Author

@sah-huawei

My one concern is the zombie worker processes that are sometimes left behind by make test.

I tried make test and could not find any rpc-related zombie processes. Could you point out the specific test cases or sequence of commands which result in rpc-related zombie processes?

@Gamenot
Copy link
Collaborator

Gamenot commented May 9, 2021

I honestly didn't look deeply enough into this to know whether this is ok, but I assume it is. My one concern is the zombie worker processes that are sometimes left behind by make test. I'm hoping this doesn't mean we will always leave behind zombies. Assuming not, I'm fine with this.

I had this concern as well and tried it out. I did not see any zombie processes.

@Adaickalavan Adaickalavan requested review from sah-huawei and a team May 11, 2021 21:45
@sah-huawei
Copy link
Contributor

sah-huawei commented May 26, 2021

@sah-huawei

My one concern is the zombie worker processes that are sometimes left behind by make test.

I tried make test and could not find any rpc-related zombie processes. Could you point out the specific test cases or sequence of commands which result in rpc-related zombie processes?

When I run make test and then ctrl-C midway through, I usually have processes like the following remaining (done just now):

$ ps -eF | grep -i smarts
steve     2560  3419  0 267054 132744 0 10:19 ?        00:00:11 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 36833
steve     4008  3419  0 267034 132308 2 10:20 ?        00:00:11 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 43355
steve     7949  3419  0 267034 132636 5 10:22 ?        00:00:11 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 52113
steve     7969  3419  0 267034 132292 0 10:22 ?        00:00:11 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 33473
steve     8011  3419  0 267034 133288 0 10:22 ?        00:00:10 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 41837
steve    27331  3419  3 280933 141584 3 18:15 pts/8    00:00:04 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 53265
steve    28391  3419  4 280934 142152 6 18:15 pts/8    00:00:05 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 56707
steve    30971  3419  7 280934 141492 3 18:16 pts/8    00:00:04 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 36381

If it is also running a test involving Ray when I ctrl-C, I also have several ray-related processes left running as well.

@Adaickalavan
Copy link
Member Author

Adaickalavan commented May 26, 2021

This pull request was meant to address the unwanted error messages during SMARTS crashes and this pull request did address it.

On the issue of leftover processes:

  1. Which specific test in make test leaves behind these processes when interrupted with ctrl-c?
  2. If you had recorded $ ps -eF | grep -i smarts at about 6pm (i.e., 18.xx), then the first 5 processes (i.e., 2560 - 8011) appear to be from some other older runs.

@sah-huawei
Copy link
Contributor

sah-huawei commented May 27, 2021

This pull request was meant to address the unwanted error messages during SMARTS crashes and this pull request did address it.

As I wrote in the original comment, if we can be sure that the change here didn't make things worse for these zombie processes (or isn't somehow related to the cause of them), I'm ok with merging it. I'll approve the PR and leave it to your discretion. But I also answer you questions below...

On the issue of leftover processes:

1. Which specific test in `make test` leaves behind these processes when interrupted with `ctrl-c`?

As you know, with 8 cores, there can be up to 6 tests running at any given time as appears to be the case here. From looking at the buffer, it appears that the following tests were still in progress:

envision/tests/test_data_replay.py::test_data_replay
smarts/core/tests/test_bubble_hijacking.py::test_bubble_hijacking
smarts/core/tests/test_observations.py::test_observations
smarts/core/tests/test_smarts.py::test_smarts_doesnt_leak_tasks_after_reset                                                                                     
smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios1-agent_and_agent_type2]

There may have been one more in progress, but I didn't see it when I scanned.

Here's the full output of that run of make test for which I had left-overs:

(.venv) [SMARTS] 9944:Wed May 26 18:10:34 ~/mos/tasks/ZBemyZ/code (refactor-waypoints *$) $ make test
scl scenario build-all scenarios
build-scenario scenarios/tests/same_location
build-scenario scenarios/tests/same_location
build-scenario scenarios/loop
build-scenario scenarios/zoo_intersection
build-scenario scenarios/minicity
build-scenario scenarios/minicity
build-scenario scenarios/cutin_stopped_vehicle_2lane
build-scenario scenarios/cutin_stopped_vehicle_2lane
build-scenario scenarios/intersections/2lane
build-scenario scenarios/intersections/2lane_circle
build-scenario scenarios/straight
build-scenario scenarios/intersections/2lane
build-scenario scenarios/zoo_intersection
build-scenario scenarios/intersections/4lane
build-scenario scenarios/intersections/6lane
build-scenario scenarios/intersections/6lane
build-scenario scenarios/intersections/4lane_t
build-scenario scenarios/intersections/4lane
build-scenario scenarios/cloverleaf
build-scenario scenarios/figure_eight
build-scenario scenarios/behavior_models/uturn/1lane
build-scenario scenarios/behavior_models/uturn/1lane
build-scenario scenarios/behavior_models/uturn/4lane
build-scenario scenarios/behavior_models/uturn/4lane
build-scenario scenarios/behavior_models/cutin/1lane_parallel_start
build-scenario scenarios/behavior_models/cutin/1lane_parallel_start
build-scenario scenarios/behavior_models/cutin/1lane_agent_ahead
Waiting on scenarios/tests/same_location/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/tests/same_location/map.net.xml ...
Waiting on scenarios/loop/map.net.xml ...
Installing scenario dependencies via '/home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 -m pip install -r scenarios/intersections/4lane_t/requirements.txt'
Installing scenario dependencies via '/home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 -m pip install -r scenarios/loop/requirements.txt'
Waiting on scenarios/zoo_intersection/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/zoo_intersection/map.net.xml ...
Waiting on scenarios/minicity/shifted_map-AUTOGEN.net.xml ...
Installing scenario dependencies via '/home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 -m pip install -r scenarios/minicity/requirements.txt'
Installing scenario dependencies via '/home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 -m pip install -r scenarios/minicity/requirements.txt'
Waiting on scenarios/minicity/map.net.xml ...
Waiting on scenarios/cutin_stopped_vehicle_2lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/cutin_stopped_vehicle_2lane/map.net.xml ...
Waiting on scenarios/intersections/2lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/intersections/2lane/map.net.xml ...
Waiting on scenarios/intersections/4lane_t/map.net.xml ...
Waiting on scenarios/intersections/4lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/intersections/4lane/map.net.xml ...
Waiting on scenarios/intersections/2lane_circle/map.net.xml ...
Waiting on scenarios/intersections/6lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/intersections/6lane/map.net.xml ...
Waiting on scenarios/straight/map.net.xml ...
Waiting on scenarios/cloverleaf/map.net.xml ...
Waiting on scenarios/figure_eight/map.net.xml ...
Waiting on scenarios/behavior_models/uturn/1lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/behavior_models/uturn/1lane/map.net.xml ...
Waiting on scenarios/behavior_models/uturn/4lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/behavior_models/uturn/4lane/map.net.xml ...
Waiting on scenarios/behavior_models/cutin/1lane_parallel_start/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/behavior_models/cutin/1lane_parallel_start/map.net.xml ...
Waiting on scenarios/behavior_models/cutin/1lane_agent_ahead/map.net.xml ...
# sstudio uses hash(...) as part of some of its type IDs. To make the tests
# repeatable we fix the seed.
PYTHONHASHSEED=42 pytest -v \
	--cov=smarts \
	--doctest-modules \
	--forked \
	--dist=loadscope \
	-n `nproc --ignore 2` \
	./envision ./smarts/contrib ./smarts/core ./smarts/env ./smarts/sstudio ./tests \
	--ignore=./smarts/core/tests/test_smarts_memory_growth.py \
	--ignore=./smarts/env/tests/test_benchmark.py \
	--ignore=./smarts/env/tests/test_learning.py \
	-k 'not test_long_determinism'
/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pytest_benchmark/logger.py:44: PytestBenchmarkWarning: Benchmarks are automatically disabled because xdist plugin is active.Benchmarks cannot be performed reliably in a parallelized environment.
  warner(PytestBenchmarkWarning(text))
===================================================================== test session starts ======================================================================
platform linux -- Python 3.7.5, pytest-6.1.1, py-1.9.0, pluggy-0.13.1 -- /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7
cachedir: .pytest_cache
benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/steve/Repos/Huawei/SMARTS
plugins: cov-2.10.1, xdist-2.1.0, notebook-0.6.1, benchmark-3.2.3, forked-1.3.0
[gw0] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw1] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw2] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw3] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw4] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw5] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw0] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
[gw1] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
[gw5] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
[gw2] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
[gw3] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
[gw4] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
gw0 ok / gw1 ok / gw2 ok / gw3 ok / gw4 ok / gw5 ok
gw0 [94] / gw1 [94] / gw2 [94] / gw3 [94] / gw4 [94] / gw5 [94]                                                                                                
scheduling tests via LoadScopeScheduling

smarts/core/scenario.py::smarts.core.scenario.Scenario.discover_routes 
envision/tests/test_data_replay.py::test_data_replay 
smarts/core/agent_interface.py::smarts.core.agent_interface.AgentInterface.replace 
smarts/contrib/malib/tests/test_malib_env.py::test_malib_env 
smarts/contrib/pymarl/tests/test_pymarl_env.py::test_pymarl_env 
smarts/core/coordinates.py::smarts.core.coordinates.Heading.relative_to 
[gw2] [  1%] PASSED smarts/core/agent_interface.py::smarts.core.agent_interface.AgentInterface.replace 
smarts/core/tests/test_bubble_manager.py::test_bubble_manager_state_change 
[gw3] [  2%] PASSED smarts/core/coordinates.py::smarts.core.coordinates.Heading.relative_to 
smarts/core/tests/test_collision.py::test_collision 
[gw4] [  3%] PASSED smarts/core/scenario.py::smarts.core.scenario.Scenario.discover_routes 
smarts/core/scenario.py::smarts.core.scenario.Scenario.is_valid_scenario 
[gw4] [  4%] PASSED smarts/core/scenario.py::smarts.core.scenario.Scenario.is_valid_scenario 
smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type0] 
[gw3] [  5%] PASSED smarts/core/tests/test_collision.py::test_collision 
smarts/core/tests/test_collision.py::test_non_collision 
[gw3] [  6%] PASSED smarts/core/tests/test_collision.py::test_non_collision 
smarts/core/tests/test_collision.py::test_collision_collide_with_standing_vehicle 
[gw3] [  7%] PASSED smarts/core/tests/test_collision.py::test_collision_collide_with_standing_vehicle 
smarts/core/tests/test_collision.py::test_collision_joust 
[gw4] [  8%] PASSED smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type0] 
smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type1] 
[gw5] [  9%] PASSED smarts/contrib/pymarl/tests/test_pymarl_env.py::test_pymarl_env 
smarts/core/tests/test_bubble_hijacking.py::test_bubble_hijacking 
[gw1] [ 10%] PASSED smarts/contrib/malib/tests/test_malib_env.py::test_malib_env 
smarts/core/tests/test_boids.py::test_boids 
[gw2] [ 11%] PASSED smarts/core/tests/test_bubble_manager.py::test_bubble_manager_state_change 
smarts/core/tests/test_bubble_manager.py::test_bubble_manager_limit[bubble0] 
[gw4] [ 12%] PASSED smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type1] 
smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type2] 
[gw1] [ 13%] FAILED smarts/core/tests/test_boids.py::test_boids 
smarts/core/tests/test_done_criteria.py::test_agents_alive_done_check[sim0] 
[gw3] [ 14%] PASSED smarts/core/tests/test_collision.py::test_collision_joust 
smarts/core/tests/test_collision.py::test_ackerman_chassis_size_unchanged 
[gw3] [ 15%] PASSED smarts/core/tests/test_collision.py::test_ackerman_chassis_size_unchanged 
smarts/core/tests/test_collision.py::test_sim_level_collision 
[gw2] [ 17%] PASSED smarts/core/tests/test_bubble_manager.py::test_bubble_manager_limit[bubble0] 
smarts/core/tests/test_bubble_manager.py::test_vehicle_spawned_in_bubble_is_not_captured 
[gw4] [ 18%] PASSED smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type2] 
smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios1-agent_and_agent_type0] 
[gw1] [ 19%] PASSED smarts/core/tests/test_done_criteria.py::test_agents_alive_done_check[sim0] 
smarts/core/tests/test_done_criteria.py::test_agents_alive_done_check[sim1] 
[gw3] [ 20%] PASSED smarts/core/tests/test_collision.py::test_sim_level_collision 
smarts/core/tests/test_dynamics_backend.py::test_steering_direction 
[gw3] [ 21%] PASSED smarts/core/tests/test_dynamics_backend.py::test_steering_direction 
smarts/core/tests/test_dynamics_backend.py::test_set_pose 
[gw3] [ 22%] PASSED smarts/core/tests/test_dynamics_backend.py::test_set_pose 
smarts/core/tests/test_observations.py::test_observations 
[gw2] [ 23%] PASSED smarts/core/tests/test_bubble_manager.py::test_vehicle_spawned_in_bubble_is_not_captured 
smarts/core/tests/test_bubble_manager.py::test_vehicle_spawned_outside_bubble_is_captured 
[gw1] [ 24%] PASSED smarts/core/tests/test_done_criteria.py::test_agents_alive_done_check[sim1] 
smarts/core/tests/test_done_criteria.py::test_agents_alive_done_check[sim2] 
[gw4] [ 25%] PASSED smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios1-agent_and_agent_type0] 
smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios1-agent_and_agent_type1] 
[gw2] [ 26%] PASSED smarts/core/tests/test_bubble_manager.py::test_vehicle_spawned_outside_bubble_is_captured 
smarts/core/tests/test_motion_planner_provider.py::test_we_reach_target_pose_at_given_time 
[gw2] [ 27%] PASSED smarts/core/tests/test_motion_planner_provider.py::test_we_reach_target_pose_at_given_time 
smarts/core/tests/test_scenario.py::test_scenario_variations_of_social_agents 
[gw2] [ 28%] PASSED smarts/core/tests/test_scenario.py::test_scenario_variations_of_social_agents 
smarts/core/tests/test_smarts.py::test_smarts_doesnt_leak_tasks_after_reset 
[gw4] [ 29%] PASSED smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios1-agent_and_agent_type1] 
smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios1-agent_and_agent_type2] 
[gw1] [ 30%] PASSED smarts/core/tests/test_done_criteria.py::test_agents_alive_done_check[sim2] 
smarts/core/tests/test_notebook.py::test_notebook1 ^C^CProcess Process-1:
Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker.py", line 48, in <module>
    from smarts.zoo import worker_pb2_grpc, worker_servicer
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker_servicer.py", line 28, in <module>
    from smarts.zoo import worker as zoo_worker
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker.py", line 67, in <module>
    importlib.import_module(mod)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/steve/Repos/Huawei/SMARTS/smarts/core/sumo_road_network.py", line 42, in <module>
    from .lanepoints import LanePoints
  File "/home/steve/Repos/Huawei/SMARTS/smarts/core/lanepoints.py", line 42, in <module>
    from sklearn.neighbors import KDTree
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/sklearn/__init__.py", line 80, in <module>
    from .base import clone
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/sklearn/base.py", line 21, in <module>
    from .utils import _IS_32BIT
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/sklearn/utils/__init__.py", line 23, in <module>
    from .class_weight import compute_class_weight, compute_sample_weight
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/sklearn/utils/class_weight.py", line 7, in <module>
    from .validation import _deprecate_positional_args
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/sklearn/utils/validation.py", line 25, in <module>
    from .fixes import _object_dtype_isnan, parse_version
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/sklearn/utils/fixes.py", line 18, in <module>
    import scipy.stats
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/scipy/stats/__init__.py", line 384, in <module>
    from .stats import *
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/scipy/stats/stats.py", line 185, in <module>
    from . import distributions
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/scipy/stats/distributions.py", line 13, in <module>
    from . import _continuous_distns
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/scipy/stats/_continuous_distns.py", line 1863, in <module>
    f = f_gen(a=0.0, name='f')
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/scipy/stats/_distn_infrastructure.py", line 1635, in __init__
    self._construct_doc(docdict, dct.get(self.name))
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/scipy/stats/_distn_infrastructure.py", line 732, in _construct_doc
    self.__doc__ = doccer.docformat(self.__doc__, tempdict)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/scipy/_lib/doccer.py", line 55, in docformat
    icount = indentcount_lines(lines[1:])
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/scipy/_lib/doccer.py", line 198, in indentcount_lines
    indentno = min(indentno, len(line) - len(stripped))
KeyboardInterrupt
Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker.py", line 48, in <module>
    from smarts.zoo import worker_pb2_grpc, worker_servicer
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker_servicer.py", line 28, in <module>
    from smarts.zoo import worker as zoo_worker
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker.py", line 67, in <module>
    importlib.import_module(mod)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/steve/Repos/Huawei/SMARTS/smarts/core/__init__.py", line 29, in <module>
    import numpy as np
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/core/__init__.py", line 104, in <module>
    from . import _add_newdocs
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/core/_add_newdocs.py", line 5957, in <module>
    add_newdoc('numpy.core.numerictypes', 'generic', ('data',
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/core/function_base.py", line 511, in add_newdoc
    _add_docstring(getattr(new, attr), docstring.strip(), warn_on_python)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/core/function_base.py", line 447, in _add_docstring
    if warn_on_python and not _needs_add_docstring(obj):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/core/function_base.py", line 437, in _needs_add_docstring
    if isinstance(obj, (types.FunctionType, types.MethodType, property)):
KeyboardInterrupt
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 1048, in execute
    return self.con.execute(sql, parameters)
KeyboardInterrupt
^C^CTraceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/main.py", line 257, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/main.py", line 313, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pytest_cov/plugin.py", line 271, in pytest_runtestloop
    self.cov_controller.finish()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pytest_cov/engine.py", line 44, in ensure_topdir_wrapper
    return meth(self, *args, **kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pytest_cov/engine.py", line 325, in finish
    self.cov.stop()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/control.py", line 658, in save
    data = self.get_data()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/control.py", line 717, in get_data
    self._post_save_work()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/control.py", line 742, in _post_save_work
    self._data.touch_file(file_path, plugin_name)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 545, in touch_file
    self._file_id(filename, add=True)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 367, in _file_id
    with self._connect() as con:
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 1026, in __enter__
    self._connect()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 1008, in _connect
    self.con = sqlite3.connect(filename, check_same_thread=False)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/main.py", line 257, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/terminal.py", line 828, in pytest_keyboard_interrupt
    self._keyboardinterrupt_memo = excinfo.getrepr(funcargs=True)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 627, in getrepr
    return fmt.repr_excinfo(self)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 884, in repr_excinfo
    reprtraceback = self.repr_traceback(excinfo_)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 825, in repr_traceback
    reprentry = self.repr_traceback_entry(entry, einfo)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 769, in repr_traceback_entry
    source = self._getentrysource(entry)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 677, in _getentrysource
    source = entry.getsource(self.astcache)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 230, in getsource
    self.lineno, source, astnode=astnode
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/source.py", line 181, in getstatementrange_ast
    start, end = get_statement_startend2(lineno, astnode)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/source.py", line 149, in get_statement_startend2
    for x in ast.walk(node):
  File "/usr/lib/python3.7/ast.py", line 243, in walk
    todo.extend(iter_child_nodes(node))
  File "/usr/lib/python3.7/ast.py", line 198, in iter_child_nodes
    for name, field in iter_fields(node):
  File "/usr/lib/python3.7/ast.py", line 186, in iter_fields
    for field in node._fields:
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/bin/pytest", line 8, in <module>
    sys.exit(console_main())
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/config/__init__.py", line 187, in console_main
    code = main()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/config/__init__.py", line 165, in main
    config=config
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/main.py", line 306, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/main.py", line 257, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/terminal.py", line 794, in pytest_sessionfinish
    outcome.get_result()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/xdist/dsession.py", line 86, in pytest_sessionfinish
    nm.teardown_nodes()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/xdist/workermanage.py", line 78, in teardown_nodes
    self.group.terminate(self.EXIT_TIMEOUT)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/execnet/multi.py", line 220, in terminate
    for gw in self._gateways_to_join
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/execnet/multi.py", line 311, in safe_terminate
    reply.get()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/execnet/gateway_base.py", line 206, in get
    self.waitfinish(timeout)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/execnet/gateway_base.py", line 213, in waitfinish
    if not self._result_ready.wait(timeout):
  File "/usr/lib/python3.7/threading.py", line 552, in wait
    signaled = self._cond.wait(timeout)
  File "/usr/lib/python3.7/threading.py", line 296, in wait
    waiter.acquire()
KeyboardInterrupt
Makefile:3: recipe for target 'test' failed
make: *** [test] Interrupt
2. If you had recorded `$ ps -eF | grep -i smarts` at about 6pm (i.e., 18.xx), then the first 5 processes (i.e., 2560 - 8011) appear to be from some other older runs.

Yeah I see that (but they were definitely from today too as I had to reboot early this morning), but the point is that these zombies still happen, fairly frequently (as I only ran tests a few times today), and if you aren't vigilant, they accumulate.

It's not hard to reproduce. In fact, I just did it again (roughly the same test as above) and got this:

(.venv) [SMARTS] 9971:Wed May 26 21:34:00 ~/mos/tasks/ZBemyZ/code (imitation_learning_fixes *$) $ pkill --signal=9 -f  "^.*SMARTS..venv.*"
(.venv) [SMARTS] 9972:Wed May 26 21:34:04 ~/mos/tasks/ZBemyZ/code (imitation_learning_fixes *$) $ pkill --signal=9 -f "^ray::.*"
(.venv) [SMARTS] 9973:Wed May 26 21:34:06 ~/mos/tasks/ZBemyZ/code (imitation_learning_fixes *$) $ 
(.venv) [SMARTS] 9973:Wed May 26 21:34:07 ~/mos/tasks/ZBemyZ/code (imitation_learning_fixes *$) $ make test
scl scenario build-all scenarios
Waiting on scenarios/tests/same_location/shifted_map-AUTOGEN.net.xml ...
build-scenario scenarios/tests/same_location
build-scenario scenarios/tests/same_location
build-scenario scenarios/zoo_intersection
build-scenario scenarios/zoo_intersection
build-scenario scenarios/cutin_stopped_vehicle_2lane
build-scenario scenarios/cutin_stopped_vehicle_2lane
build-scenario scenarios/minicity
build-scenario scenarios/intersections/2lane
build-scenario scenarios/intersections/2lane
build-scenario scenarios/intersections/4lane_t
build-scenario scenarios/loop
build-scenario scenarios/cloverleaf
build-scenario scenarios/intersections/2lane_circle
build-scenario scenarios/minicity
build-scenario scenarios/behavior_models/uturn/4lane
build-scenario scenarios/straight
build-scenario scenarios/intersections/4lane
build-scenario scenarios/figure_eight
build-scenario scenarios/behavior_models/uturn/1lane
build-scenario scenarios/intersections/4lane
build-scenario scenarios/behavior_models/cutin/1lane_parallel_start
build-scenario scenarios/behavior_models/cutin/1lane_agent_ahead
build-scenario scenarios/intersections/6lane
build-scenario scenarios/behavior_models/uturn/4lane
build-scenario scenarios/behavior_models/uturn/1lane
build-scenario scenarios/behavior_models/cutin/1lane_parallel_start
build-scenario scenarios/intersections/6lane
Waiting on scenarios/tests/same_location/map.net.xml ...
Waiting on scenarios/loop/map.net.xml ...
Installing scenario dependencies via '/home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 -m pip install -r scenarios/intersections/4lane_t/requirements.txt'
Installing scenario dependencies via '/home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 -m pip install -r scenarios/loop/requirements.txt'
Waiting on scenarios/zoo_intersection/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/zoo_intersection/map.net.xml ...
Waiting on scenarios/minicity/shifted_map-AUTOGEN.net.xml ...
Installing scenario dependencies via '/home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 -m pip install -r scenarios/minicity/requirements.txt'
Installing scenario dependencies via '/home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 -m pip install -r scenarios/minicity/requirements.txt'
Waiting on scenarios/minicity/map.net.xml ...
Waiting on scenarios/cutin_stopped_vehicle_2lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/cutin_stopped_vehicle_2lane/map.net.xml ...
Waiting on scenarios/intersections/2lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/intersections/2lane/map.net.xml ...
Waiting on scenarios/intersections/4lane_t/map.net.xml ...
Waiting on scenarios/intersections/4lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/intersections/4lane/map.net.xml ...
Waiting on scenarios/intersections/2lane_circle/map.net.xml ...
Waiting on scenarios/intersections/6lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/intersections/6lane/map.net.xml ...
Waiting on scenarios/straight/map.net.xml ...
Waiting on scenarios/cloverleaf/map.net.xml ...
Waiting on scenarios/figure_eight/map.net.xml ...
Waiting on scenarios/behavior_models/uturn/1lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/behavior_models/uturn/1lane/map.net.xml ...
Waiting on scenarios/behavior_models/uturn/4lane/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/behavior_models/uturn/4lane/map.net.xml ...
Waiting on scenarios/behavior_models/cutin/1lane_parallel_start/shifted_map-AUTOGEN.net.xml ...
Waiting on scenarios/behavior_models/cutin/1lane_parallel_start/map.net.xml ...
Waiting on scenarios/behavior_models/cutin/1lane_agent_ahead/map.net.xml ...
# sstudio uses hash(...) as part of some of its type IDs. To make the tests
# repeatable we fix the seed.
PYTHONHASHSEED=42 pytest -v \
	--cov=smarts \
	--doctest-modules \
	--forked \
	--dist=loadscope \
	-n `nproc --ignore 2` \
	./envision ./smarts/contrib ./smarts/core ./smarts/env ./smarts/sstudio ./tests \
	--ignore=./smarts/core/tests/test_smarts_memory_growth.py \
	--ignore=./smarts/env/tests/test_benchmark.py \
	--ignore=./smarts/env/tests/test_learning.py \
	-k 'not test_long_determinism'
/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pytest_benchmark/logger.py:44: PytestBenchmarkWarning: Benchmarks are automatically disabled because xdist plugin is active.Benchmarks cannot be performed reliably in a parallelized environment.
  warner(PytestBenchmarkWarning(text))
===================================================================== test session starts ======================================================================
platform linux -- Python 3.7.5, pytest-6.1.1, py-1.9.0, pluggy-0.13.1 -- /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7
cachedir: .pytest_cache
benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/steve/Repos/Huawei/SMARTS
plugins: cov-2.10.1, xdist-2.1.0, notebook-0.6.1, benchmark-3.2.3, forked-1.3.0
[gw0] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw1] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw2] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw3] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw4] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw5] linux Python 3.7.5 cwd: /home/steve/Repos/Huawei/SMARTS
[gw1] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
[gw0] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
[gw2] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
[gw3] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
[gw4] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
[gw5] Python 3.7.5 (default, Feb 23 2021, 13:22:40)  -- [GCC 8.4.0]
gw0 [94] / gw1 [94] / gw2 [94] / gw3 [94] / gw4 [94] / gw5 [94]                                                                                                
scheduling tests via LoadScopeScheduling

smarts/core/scenario.py::smarts.core.scenario.Scenario.discover_routes 
envision/tests/test_data_replay.py::test_data_replay 
smarts/core/agent_interface.py::smarts.core.agent_interface.AgentInterface.replace 
smarts/contrib/malib/tests/test_malib_env.py::test_malib_env 
smarts/core/coordinates.py::smarts.core.coordinates.Heading.relative_to 
smarts/contrib/pymarl/tests/test_pymarl_env.py::test_pymarl_env 
[gw4] [  1%] PASSED smarts/core/coordinates.py::smarts.core.coordinates.Heading.relative_to 
smarts/core/tests/test_collision.py::test_collision 
[gw3] [  2%] PASSED smarts/core/agent_interface.py::smarts.core.agent_interface.AgentInterface.replace 
smarts/core/tests/test_bubble_manager.py::test_bubble_manager_state_change 
[gw5] [  3%] PASSED smarts/core/scenario.py::smarts.core.scenario.Scenario.discover_routes 
smarts/core/scenario.py::smarts.core.scenario.Scenario.is_valid_scenario 
[gw4] [  4%] PASSED smarts/core/tests/test_collision.py::test_collision 
smarts/core/tests/test_collision.py::test_non_collision 
[gw5] [  5%] PASSED smarts/core/scenario.py::smarts.core.scenario.Scenario.is_valid_scenario 
smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type0] 
[gw4] [  6%] PASSED smarts/core/tests/test_collision.py::test_non_collision 
smarts/core/tests/test_collision.py::test_collision_collide_with_standing_vehicle 
[gw4] [  7%] PASSED smarts/core/tests/test_collision.py::test_collision_collide_with_standing_vehicle 
smarts/core/tests/test_collision.py::test_collision_joust 
[gw5] [  8%] PASSED smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type0] 
smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type1] 
[gw0] [  9%] PASSED smarts/contrib/malib/tests/test_malib_env.py::test_malib_env 
smarts/core/tests/test_boids.py::test_boids 
[gw3] [ 10%] PASSED smarts/core/tests/test_bubble_manager.py::test_bubble_manager_state_change 
smarts/core/tests/test_bubble_manager.py::test_bubble_manager_limit[bubble0] 
[gw2] [ 11%] PASSED smarts/contrib/pymarl/tests/test_pymarl_env.py::test_pymarl_env 
smarts/core/tests/test_bubble_hijacking.py::test_bubble_hijacking 
[gw0] [ 12%] FAILED smarts/core/tests/test_boids.py::test_boids 
smarts/core/tests/test_coordinates.py::test_conversion_sumo 
[gw5] [ 13%] PASSED smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type1] 
smarts/core/tests/test_controller_lane.py::test_lane_following_controller[scenarios0-agent_and_agent_type2] 
[gw0] [ 14%] PASSED smarts/core/tests/test_coordinates.py::test_conversion_sumo 
smarts/core/tests/test_coordinates.py::test_conversion_panda ^C^CProcess Process-1:
Process Process-2:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 1048, in execute
    return self.con.execute(sql, parameters)
KeyboardInterrupt
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/envision/client.py", line 134, in _write_log_state
    state = queue.get()
  File "/usr/lib/python3.7/multiprocessing/queues.py", line 94, in get
    res = self._recv_bytes()
  File "/usr/lib/python3.7/multiprocessing/connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
  File "/usr/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
    buf = self._recv(4)
  File "/usr/lib/python3.7/multiprocessing/connection.py", line 379, in _recv
    chunk = read(handle, remaining)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 300, in _bootstrap
    util._exit_function()
  File "/usr/lib/python3.7/multiprocessing/util.py", line 311, in _exit_function
    _run_finalizers(0)
  File "/usr/lib/python3.7/multiprocessing/util.py", line 277, in _run_finalizers
    finalizer()
  File "/usr/lib/python3.7/multiprocessing/util.py", line 201, in __call__
    res = self._callback(*self._args, **self._kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pytest_cov/embed.py", line 96, in cleanup
    _cleanup(_active_cov)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pytest_cov/embed.py", line 82, in _cleanup
    cov.save()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/control.py", line 658, in save
    data = self.get_data()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/control.py", line 717, in get_data
    self._post_save_work()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/control.py", line 742, in _post_save_work
    self._data.touch_file(file_path, plugin_name)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 545, in touch_file
    self._file_id(filename, add=True)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 369, in _file_id
    self._file_map[filename] = cur.lastrowid
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 1031, in __exit__
    def __exit__(self, exc_type, exc_value, traceback):
KeyboardInterrupt
Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker.py", line 48, in <module>
    from smarts.zoo import worker_pb2_grpc, worker_servicer
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker_servicer.py", line 28, in <module>
    from smarts.zoo import worker as zoo_worker
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker.py", line 67, in <module>
    importlib.import_module(mod)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/steve/Repos/Huawei/SMARTS/smarts/core/__init__.py", line 29, in <module>
    import numpy as np
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/__init__.py", line 154, in <module>
    from . import ma
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/ma/__init__.py", line 44, in <module>
    from . import core
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/ma/core.py", line 1249, in <module>
    arctan2 = _MaskedBinaryOperation(umath.arctan2, 0.0, 1.0)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/ma/core.py", line 1010, in __init__
    super(_MaskedBinaryOperation, self).__init__(mbfunc)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/ma/core.py", line 902, in __init__
    self.__doc__ = ufunc.__doc__
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/core/_internal.py", line 795, in _ufunc_doc_signature_formatter
    in_args = ', '.join('x{}'.format(i+1) for i in range(ufunc.nin))
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/numpy/core/_internal.py", line 795, in <genexpr>
    in_args = ', '.join('x{}'.format(i+1) for i in range(ufunc.nin))
KeyboardInterrupt
Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker.py", line 48, in <module>
    from smarts.zoo import worker_pb2_grpc, worker_servicer
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker_pb2_grpc.py", line 5, in <module>
    import smarts.zoo.worker_pb2 as worker__pb2
  File "/home/steve/Repos/Huawei/SMARTS/smarts/zoo/worker_pb2.py", line 5, in <module>
    from google.protobuf import descriptor as _descriptor
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/google/protobuf/__init__.py", line 37, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3242, in <module>
    @_call_aside
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3226, in _call_aside
    f(*args, **kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3270, in _initialize_master_working_set
    for dist in working_set
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3270, in <genexpr>
    for dist in working_set
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2780, in activate
    fixup_namespace_packages(self.location)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2293, in fixup_namespace_packages
    subpath = _handle_ns(package, path_item)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2194, in _handle_ns
    loader = importer.find_spec(packageName).loader
  File "<frozen importlib._bootstrap_external>", line 1391, in find_spec
KeyboardInterrupt
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 250, in _create_db
    db.execute("insert into coverage_schema (version) values (?)", (SCHEMA_VERSION,))
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/sqldata.py", line 1048, in execute
    return self.con.execute(sql, parameters)
KeyboardInterrupt
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/collector.py", line 401, in cached_mapped_file
    return self.mapped_file_cache[key]
KeyError: (<class 'str'>, '/home/steve/Repos/Huawei/SMARTS/smarts/__init__.py')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/files.py", line 165, in abs_file
    path = os.path.realpath(path)
  File "/usr/lib/python3.7/posixpath.py", line 395, in realpath
    path, ok = _joinrealpath(filename[:0], filename, {})
  File "/usr/lib/python3.7/posixpath.py", line 429, in _joinrealpath
    if not islink(newpath):
  File "/usr/lib/python3.7/posixpath.py", line 171, in islink
    st = os.lstat(path)
KeyboardInterrupt
^C^CTraceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/main.py", line 257, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/main.py", line 313, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pytest_cov/plugin.py", line 271, in pytest_runtestloop
    self.cov_controller.finish()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pytest_cov/engine.py", line 44, in ensure_topdir_wrapper
    return meth(self, *args, **kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pytest_cov/engine.py", line 325, in finish
    self.cov.stop()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/control.py", line 658, in save
    data = self.get_data()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/control.py", line 717, in get_data
    self._post_save_work()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/control.py", line 740, in _post_save_work
    for file_path, plugin_name in self._inorout.find_possibly_unexecuted_files():
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/inorout.py", line 440, in find_possibly_unexecuted_files
    for ret in self._find_executable_files(src):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/inorout.py", line 463, in _find_executable_files
    file_path = canonical_filename(file_path)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/files.py", line 75, in canonical_filename
    cf = abs_file(cf)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/coverage/files.py", line 168, in abs_file
    path = os.path.abspath(path)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/main.py", line 257, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/terminal.py", line 828, in pytest_keyboard_interrupt
    self._keyboardinterrupt_memo = excinfo.getrepr(funcargs=True)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 627, in getrepr
    return fmt.repr_excinfo(self)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 884, in repr_excinfo
    reprtraceback = self.repr_traceback(excinfo_)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 825, in repr_traceback
    reprentry = self.repr_traceback_entry(entry, einfo)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 769, in repr_traceback_entry
    source = self._getentrysource(entry)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 677, in _getentrysource
    source = entry.getsource(self.astcache)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/code.py", line 230, in getsource
    self.lineno, source, astnode=astnode
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/source.py", line 181, in getstatementrange_ast
    start, end = get_statement_startend2(lineno, astnode)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/_code/source.py", line 149, in get_statement_startend2
    for x in ast.walk(node):
  File "/usr/lib/python3.7/ast.py", line 243, in walk
    todo.extend(iter_child_nodes(node))
  File "/usr/lib/python3.7/ast.py", line 199, in iter_child_nodes
    if isinstance(field, AST):
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/steve/Repos/Huawei/SMARTS/.venv/bin/pytest", line 8, in <module>
    sys.exit(console_main())
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/config/__init__.py", line 187, in console_main
    code = main()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/config/__init__.py", line 165, in main
    config=config
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/main.py", line 306, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/main.py", line 257, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/_pytest/terminal.py", line 794, in pytest_sessionfinish
    outcome.get_result()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/xdist/dsession.py", line 86, in pytest_sessionfinish
    nm.teardown_nodes()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/xdist/workermanage.py", line 78, in teardown_nodes
    self.group.terminate(self.EXIT_TIMEOUT)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/execnet/multi.py", line 220, in terminate
    for gw in self._gateways_to_join
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/execnet/multi.py", line 311, in safe_terminate
    reply.get()
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/execnet/gateway_base.py", line 206, in get
    self.waitfinish(timeout)
  File "/home/steve/Repos/Huawei/SMARTS/.venv/lib/python3.7/site-packages/execnet/gateway_base.py", line 213, in waitfinish
    if not self._result_ready.wait(timeout):
  File "/usr/lib/python3.7/threading.py", line 552, in wait
    signaled = self._cond.wait(timeout)
  File "/usr/lib/python3.7/threading.py", line 296, in wait
    waiter.acquire()
KeyboardInterrupt
Makefile:3: recipe for target 'test' failed
make: *** [test] Interrupt

(.venv) [SMARTS] 9974:Wed May 26 21:40:42 ~/mos/tasks/ZBemyZ/code (imitation_learning_fixes *$) $ 
(.venv) [SMARTS] 9974:Wed May 26 21:40:44 ~/mos/tasks/ZBemyZ/code (imitation_learning_fixes *$) $ ps -eF | grep -i smarts
steve    21223  3419  5 267032 132872 0 21:39 pts/8    00:00:04 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 60963
steve    22447  3419 12 267055 132316 4 21:40 pts/8    00:00:05 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 34167
steve    22461  3419 12 267035 132288 2 21:40 pts/8    00:00:05 /home/steve/Repos/Huawei/SMARTS/.venv/bin/python3.7 /home/steve/Repos/Huawei/SMARTS/smarts/zoo/manager.py --port 33245

@Adaickalavan Adaickalavan merged commit 8b8539b into develop Jun 2, 2021
@Adaickalavan Adaickalavan deleted the try-except-zoo-manager branch June 2, 2021 11:41
Gamenot added a commit that referenced this pull request Jul 2, 2021
* Envision near real time (#785)

* Added frame_time in envision State, frame_time is the elapsed simulation time

* Added "near real-time" and "uncapped" mode in Envision

* add optimization to get frame_time from frame in server.py by using ijson instead of json loading the entire frame

Co-authored-by: Stephen Hockema <[email protected]>

* Zoo manager spawned as a subprocess (#814)

* Envision fixes (#810)

* Fixed race condition with seek flushing.

* formatting

* also limit stateQueue size while I'm at it.

* More options for buffer overflow.

* added comment

* Quiet Envision logs (#820)

* Quiet error received when initially unable to connect to Envision.

* output a warning on the first failed connection only.

* formatting

* added to CHANGELOG

* Quiet pybullet import msgs (#821)

* quiet "pybullet build time: ..." messages on stdout when pybullet is imported.

* added CHANGELOG entry

* formatting

* typo fix in CHANGELOG

* fixed typo in filename

* fixed backwards polarity on dones check (#824)

* fix rounding cf timestp_sec to ensure we always keep enough digits (#825)

* ULTRA Update callbacks (#818)

* update episode callback

* Apply suggestions from code review

Co-authored-by: christianjans <[email protected]>

Co-authored-by: christianjans <[email protected]>

* Added a new pypi instructions file to update general user installation instructions

* Ignore tune test in ULTRA's heavy CI tests (#811)

* Make naming consistent for task 2's levels (#806)

* Fixed typo in instructions

* Cleaned up the instructions to only include the pip install instructions

* Added further instructions about the modules involved in the package and how to use them to create environments and scenarios

* updated CHANGELOG.md

* updated README_pypi.md based on changes requested

* fixed a few more minor typos

* added command to remove all .coverageXX files after the tests commands exit

* added a separate recipe to remove all the coverage files

* minor bug fix

* remove __init__.py files from scenarios and examples modules so that they are removed from python installation package or pip

* Revert "remove __init__.py files from scenarios and examples modules so that they are removed from python installation package or pip"

This reverts commit bdf80e0

* remove __init__.py file from scenarios module so that it is removed from python installation package or pip

* rename the __init__.py file to argument_parser.py for examples folder

* renamed README_pypi.md

* Add social vehicles controlled by custom policy through bubbles (#793)

* Add ability to include bubbles in scenarios

* Add 'bubbles' to task configs

* Add stops test

* Add bubbles test

* Refactor stops implementation in generate_scenarios.py

* Refactor stops generation

* Add type hints and docstrings

* Remove stops from default bubble scenarios

* Add __init__.py to tests/tune/ (#840)

* Fix README typos in ULTRA (#764)

* Fix typos in ultra/README.md

* Fix typo in the citation

* Fix headless argument behaviour in ULTRA (#737)

* Fix headless argument in ULTRA scripts

* Change headless flag to behave like SMARTS

* Control number of episodes in ULTRA tests (rllib and train) (#739)

* Make evaluations run in parallel to training

* Add rollout_fragment_length and max_episode_steps to rllib

* Add new flags to documentation

* Fix flag in example

* Ensure evaluation is not run in test_train.py

* Check if log_dir doesn't exist in test_train.py

* Fix typo in argument and set eval_episodes to 0

* Check if not exists for paths

* Fix formatting

* Update evaluate and train to evaluate per episode (#639)

* Update evaluate and train to eval per episode

* Fix tests and change normalization

* Fix formatting

* Record episode for train/eval at the same time

* Train performance averages last eval_rate episodes

* Add gap_mode and calculate generalization gap

* Enable explore during eval for better comparison

* Fix formatting

* Fix averaging in record_episode

* Only average scalars in record_episode

* Check for scalar when calculating gap

* Fix formatting

* Fix bugs introduced by merge

* Fix calculate_gap

* Fix averaging over episodes

* Fix formatting

* Check eval_episodes is 0 before evaluation

* Evaluate on train and test without exploration

* Make train/test occur in one ray.get

* Remove episode_count

* Remove episode_count from tests

* Remove averaging over training episodes

* Restructure evaluation_check with eval_mode = False

* Fix formatting

* try split ci test method

* Check for valid eval_episodes inside evaluation_check

* Removed averaging  feature of record_episode

* Fix formatting

Co-authored-by: Jenish Patel <[email protected]>

* Merge with ultra-rllib-speedup-tests

* Rename evaluation_task_id for training

* Simplify argument to ray.wait(...)

* Remove print statements

* Fix defaults

* Fix eval-rate in docs

* Initial changes (#744)

Co-authored-by: christianjans <[email protected]>
Co-authored-by: Jenish Patel <[email protected]>
Co-authored-by: christianjans <[email protected]>

* Bump 0.4.15 -> 0.4.16

* Make format

* Update missing version numbers

* switched import statement to relative import

* bug fix

* made a new bin folder and moved gen_header.sh and header_test.sh to that folder

* made a new etc folder and moved the third party folder into it

* moved tools folder to etc folder

* moved extras folder to etc

* moved tools folder to examples folder

* moved benchmark folder to etc folder

* moved benchmark folder to cases folder and updated import statements

* updated Makefile with proposed changes

* moved install_deps.sh to etc/setup

* updated Makefile based on changes proposed

* moved docker files to etc/docker folder

* fixed script paths in Makefile

* fixed script paths in ci files

* bug fix

* bug fix

* added recipe to remove coverageXXX and coverage.XXX files in Makefile

* added README.pypi.md to etc/setup

* fixed paths for dockerfile and made path changes in README.md

* updated CHANGELOG.md

* added __init__.py to scenarios and examples and removed them from pip installation in setup.py

* updated based on proposed changes

* revert back to absolute paths

* added __init__.py

* update CHANGELOG.md

* new Imitation action space (#854)

* first pass at new Imitation action space
also fixed bug for non-dynamic vehicles not getting actions

* Only do non-dynamic actions for agents not owned by a Provider

* use actual mass from chassis instead of hardcoding

* added hack to allow setting the initial vehicle speed

* don't use Sumo here by default

* added CHANGELOG entries

* update from review:  normalize by 4-wheel torque

* ULTRA Improve high density traffic (#783)

* experiment with different begin time functions

* fixed map position in gif

* added legends

* WIP: experimenting with different combinations of traffic settings

* save begin time settings

* added more maps to high-density task, constrict stopwatcher begin time and t-intersection distribution improved from high-density traffic

* formatted

* clean up

* final traffic settings saved

* added mid-density to compare, modified high-density distribution

* simplified the high density traffic to lessen congestion

* more tuning

* more tuning

* added video analysis test

* clean up

* Apply suggestions from code review

Co-authored-by: christianjans <[email protected]>

* changes from code review

* comment changes

* slight mod to traffic distribution & relaxed stopwatcher begin times

* Update begin_time_init_funcs.py

Co-authored-by: christianjans <[email protected]>

* remove debugging levels

* small fix

Co-authored-by: christianjans <[email protected]>

* Remove extra comma in ULTRA citation (#849)

* Remove extra comma in README citation

* Use period instead of comma

* revert back the file to prevent ci-test from failing for now

* bug fix

* reproducing bug

* reproducing bug

* bug fix

* Fixed the bug by turning off the wrong_way event when vehicle goes into an intersection.
Updated CHANGELOG.md.

* Traffic History Dones (#827)

* better handling of Dones for traffic history
- detect vehicles dropping out of history
- added ExitGoal for imitation learning agents

* Updated CHANGELOG.

* back out deprecation fix

* allow for collisions to be reported in Events even if goal reached

* Changed ExitGoal to TraverseGoal.
Backed out semantic change to done Events.
(feedback from dicussions)

* type hints

* updates from review & formatting

* merge

* Multiple replacement of history vehicles (#836)

* First pass at multi-agent IL example

* choose only overlapping vehicles to replace
also, refactored TrafficHistory to clean up database queries

* moved TraffiCHistory class to its own file

* minor none check for replaced history vehicles

* refactored overlapping_choice into TrafficHistory

* updates from review

* allow -k as a shortcut for --replacements-per-episode

* formatting

* added some type hints

* more type hints

* updates from review

* updates from review

* formatting

* more type hints

* fixed weird bug in last PR

* updated based on changes proposed

* updated based on changes proposed

* updated based on changes proposed

* removed the additional files to reproduce the bug

* refactoring

* reformatting sensors.py

* reformatted sensors.py through black

* updated CHANGELOG.md

* added max-steps arg (#861)

* Fix permission error.

* moved the script etc/setup folder

* ULTRA Simple level (#857)

* added simple level

* classified simple levels, position offsets

Classified simple levels into v0, v1, v2. Move the position offsets to route distribution

* small modification

* pos_offset not mandatory

* tweaked distribution flags & formatted

* moved cross intersection types to test section in levels

* bubbles flags added

* renamed simple distribution, added a more general simple level

* reinstated blocks distribution

* Apply suggestions from code review

Co-authored-by: christianjans <[email protected]>

* moved debugging levels from task1 -> taskX

Co-authored-by: christianjans <[email protected]>

* update based on proposed changes

* path fix

* reformatted file using black

* renamed etc folder to conf, moved README.pypi.md to utils/setup and supervisord.conf to examples

* renamed cases to baselines

* removed CONTRIBUTING.md from docs and updated the top level one

* fixed CI test path

* os path fix

* reformatting file using black

* Bugfix memory issues (#852)

* Cap threadpoolexecutor virtual memory growth

* Fix sumo memory growth

* Make format

* Apply suggestions

* Update reset of sumo to every 50

* Add fixes to changelog

* TODO to remove fix when memory growth fixed

* revert back to 4 grpc connection workers

* Make format

* Bugfix remove unused `make` pview (#845)

* Remove pview for unused .egg files

* Update  changelog

* refactored repeating code to a class method

* updated CHANGELOG.md

* reformatted code

* removed unit test file from another branch

* ULTRA Update existing maps (#868)

* update existing maps

* formatted

* changes from review

* only observe cars for imitation learning (#874)

* only observe cars for imitation learning data collection

* added type hint

* revert to absolute paths

* prevent pybullet from updating during setup with python3.8

* updated CONTRIBUTING.md

* resolve merge issue

* ULTRA Add medium level (#869)

* added medium level

* adjusted traffic distr. in medium level

* removed curvy_t intersection type

* updated simple level

moved existing simple level into taskX

* cleaned up taskX config

* changed level's total

* Update ultra/ultra/scenarios/taskX/config.yaml

Co-authored-by: christianjans <[email protected]>

* updated simple level

Co-authored-by: christianjans <[email protected]>

* updated CHANGELOG.md

* removed unwanted packages

* updated requirements.txt

* updated CHANGELOG.md

* Changes based on reviews

* Created a seperate setup.py for benchmark to remove opencv-python from SMARTS in general.

* updated requirements.txt

* updated requirements.txt

* updated requirements.txt

* examples and bug fixes for imitation learning (#878)

* examples and bug fixes for imitation learning

* added PR number to CHANGELOG

* took out debugging hack

* use BoxChassis (kinematics only, no physics) by default for Imitation action space

* modified placeholder agent to replay from saved pkl files.
+-get starting speed for mission, bug fixes

* formatting

* remove unnecessary dependencies

* better rounding for history time query

* do collision processing for non-dynamic action spaces too

* fixed overzelous removal of provider type check + updates from review

* added a few more type hints

* reverted more over-zealousness re provider merging

* fixed minor bug for when speed==0.

* updates from review:  better timestep_sec rounding

* backed out Observation change + misc updates from review

* re-compute traffic history speeds based on actual positions

* Moved speed re-computation to genhistories to get out of step loop.
   - use next pos instead of prev pos in speed computation
Fixed minor bug with obs_time hack.

* don't check position on first step

* enforce vehicle history limit to cars

* fix for isclose() near 0

* move filtering by position to the end of genhistories (so all are used in smoothing stuff for edge effects)

* change back to scalar acceleration for Imitation action space

* formatting

* use current and next pos to compute history speed

* record and save the first observation (prior to step) too

* fixed history replay 1-off timestep issue
also added mission start adjustment hack for front bumper

* ULTRA add `--durations` flag to ULTRA CI tests (#885)

* added durations flag

* test pypi ultra test

* minor name fix

* history agent vehicle sizing (#886)

* allow traffic history agent vehicles' sizes to be set

* simplified controller calculations (should not change them)

* oops

* use angular_velocity for position updates too

* use current angular_velocity instead of next

* reverted angular_velocity correction to position in controller
also fixed bug to prevent stepping pybullet twice

* Refactor Waypoints (#872)

* waypoints/lanepoits refactor:  first pass

* incremental

* move lanepoints into sumo_road_network

* moved Waypoints (back) into MissionPlanner

* added some type hints

* minor cleanup

* updated comment

* added WaypointsCache and other minor performance optimizations

* debugged waypoints cache

* removed no-longer used method

* updates from review

* fixed typos

* reduced lane-following lookahead to 10

* revert lane_following_controller lookahead reduction

* added CHANGELOG entry

* update per review:  fixed hash for LinkedLanePoints

* added more type hints per review

* remove start/end offset from simple level (#891)

* Proper shutdown of RemoteAgentBuffer after code crash (#822)

* Removed atexit destroy in RemoteAgentBuffer.

* fix internal holes in sumo road network

* Updated CHANGELOG.md

* code reformatting

* code reformatting

* comments

* fixed all holes that were at extremely sharp turn (almost perpendicular).

* traffic-history data speed and heading tweaks. (#896)

* re-calculate speeds and headings based on position changes for both NGSIM and INTERACTION datasets

* comment

* ULTRA Update `docs/setup.md` (#903)

* updated setup.md

* remove manual black installation step

* added install_deps.sh into ultra

* Update ultra/docs/setup.md

Co-authored-by: christianjans <[email protected]>

* empty commit

Co-authored-by: christianjans <[email protected]>

* added an experiment utility file to replace context of supervisord.conf

* reformatting

* removed supervisord from dependencies and requirements

* Ensured unique deque objects were used in framestack. (#894)

* Updated README.md

* updated CHANGELOG.md

* updated requirements.txt

* updated requirements.txt

* updated requirements.txt

* resolving merge conflict

* resolving merge conflict

* resolving merge conflict

* path fixes

* path fixes

* Fix args count error caused by `websocket` (#906)

* Fix vargs error sometimes caused by websocket

* Change vargs to 2 additional defaults

* Add fix to changelog

* ignore options not defined in the command

* reformatting

* open new web browser tab automatically

* reformatting

* added scl zoo command to installl agents at the specified paths

* Updated CHANGELOG.md

* update tensorflow for Rl_Agent

* Update getting_started.md (#925)

* update tensorflow for Rl_Agent

* added test file for rl-agent

* updated the wheel file for rl-agent installation

* updated based on reviews

* added another option to change port

* Small fix to docs/getting_started.md (#931)

* cleanup

* reformatting and more detail to error output

* reformatting and more detail to error output

* bump up the version number, update scenarios for rl-agent

* updated wheel file for rl-agent

* updated CHANGELOG.md

* updated README.md and cleanup the environment before installing the agents.

* updated README.md and cleanup the environment before installing the agents.

* Add flag to disable mission shuffling when generating scenarios in ULTRA (#927)

* Add option to generate scenarios without shuffling missions

* Add comments to mission shuffling tests

* Fix comments' flag names

* Warning if port passed without starting envision.

* Warning if port passed without starting envision.

* remove argument parser (#935)

* refactoring

* revert changes

* bug fix

* bug fix

* ULTRA Migrate from step-based to episode-based sampling (#932)

* change agent_itr to episode.index

* formatted

* recording data episodically in tune.py and train.py

* change recording_step inside evaluate_saved_model()

* added episode indices test

* Update ultra/tests/test_evaluate.py

Co-authored-by: christianjans <[email protected]>

* Update ultra/tests/test_evaluate.py

Co-authored-by: christianjans <[email protected]>

Co-authored-by: christianjans <[email protected]>

* replace the panda3d.Quat.xform method to remove dependency from panda3D package

* wrap the import statements and ShowBaseInstance class in try block and warn user if they have not installed the [render] dependencies.

* make sure the CI tests install dependencies before rendering camera observations

* remove panda3d from dependencies in setup.py

* Updated CHANGELOG.md

* ULTRA Run tests in forked subprocesses (#937)

* forked train test

* remove backslash

* try forking evaluate test

* small fix

* small fix

* small fix

* comment added

* update documentation about rendering and camera based observations

* moved helper functions to utils/math

* reformat the try block to raise RendererException with warning message. Comments.

* rename the dependency name from render to camera-obs

* Multi-agent FrameStack wrapper (#916)

* Added multi-agent FrameStack wrapper and test.

* cleaner way to make renderer optional

* formatting

* Refactor ULTRA adapter to support benchmarking (#871)

* Initial ideas for refactored adapter

* Define the reward and observation adapters

* Finish basic adapter types in adapter.py

* Get PPO baseline to run

* Get SAC baseline to run

* Get TD3 baseline to run

* Get RLlib training to work

* Get DQN baseline to run

* Get BDQN baseline to run

* Get ULTRA Tune to run

* Pass ULTRA CI tests

* Format the code

* Move adapters to own directory

* Remove original adapter and state preprocessors

* Add discrete action Gym space

* Implement default image observation adapter function

* Simplify required_interface_fromtypes function

* Initialize ultra_scores from enum type

* Comment constants in default vector and reward

* Change adapter CI test to use new adapters

* Use seed from parameters for social vehicle config in RLlib

* Add docstrings to adapters

* Convert TODO regarding ULTRA score to NOTE in ULTRA environments

* Fix small logic errors in default_observation_image_adapter

* Apply small changes from review

* Create deepcopy of observation before performing vector adaptation

* Add initial documentation for default adapters

* Add reason for sorting social vehicles by distance in adapters.md

* Keep consistent line length in adapters.md

* Add comments to image adapter constants

* Edit docstring of image adapter function

* Change image observation adapter to produce a 3D array

* Test adapter's Gym space in adapter tests

* Change gray-scale weighting to (0.1, 0.8, 0.1)

* Fix 'enironment' typo and describe the_environment_reward in docs/adapters.md

* Keep variable name of the rewards obtained from the environment consistent

* User assertIn instead of assertTrue for testing containing in test_adapter.py

* Add default info adapter to remove reward adapter's NeighborhoodVehicles dependency (#902)

* Initial changes

* Format the code

* Remove ultra_scores from the ULTRA environment

* Add info adapter documentation

* Add info adapter test

* Move shared adapter constants a common file

* Make trimming of extra social vehiccles explicit

* Replace RLlib environment info adaptation with default info adapter in agent

* minor bug fix. Reformatting

* Say which tests are run in ULTRA CI tests rather than use `--ignore` (#941)

* Explicitly say which tests are run in heavy and light

* Fix 'analysys' spelling mistake

* ULTRA Minimalize `train.py` script (#904)

* Initial ideas for refactored adapter

* Define the reward and observation adapters

* Finish basic adapter types in adapter.py

* Get PPO baseline to run

* Get SAC baseline to run

* Get TD3 baseline to run

* Get RLlib training to work

* Get DQN baseline to run

* Get BDQN baseline to run

* Get ULTRA Tune to run

* Pass ULTRA CI tests

* Format the code

* Move adapters to own directory

* Remove original adapter and state preprocessors

* Add discrete action Gym space

* Implement default image observation adapter function

* Simplify required_interface_fromtypes function

* Initialize ultra_scores from enum type

* Comment constants in default vector and reward

* Change adapter CI test to use new adapters

* Use seed from parameters for social vehicle config in RLlib

* Add docstrings to adapters

* Convert TODO regarding ULTRA score to NOTE in ULTRA environments

* Fix small logic errors in default_observation_image_adapter

* Apply small changes from review

* Create deepcopy of observation before performing vector adaptation

* Add initial documentation for default adapters

* save work

* moved parsing outside of main

* made build_agent() public

* empty commit

* added max_steps args

* empty commit

* small fix

* changes from code review

* small fix

* bypass hard coded file name

* clean up

Co-authored-by: christianjans <[email protected]>

* Add trajectory interpolation provider.

* Update scenario building documentation and arguments in ULTRA (#944)

* Fix scl scenario build command in docs

* added default value to pool_dir arg

* make path relative to base ultra dir

* update scenario README

* add logic clause to allow build_scenarios() function calls to not mandate using pool_dir argument

* Change pool_dir initialization in build_scenarios

Co-authored-by: Jenish Patel <[email protected]>

* Add frame stacking to ULTRA (#948)

* Initial changes

* Add initial environment documentation

* Fix ULTRA environment and adapter test to pass tests

* Clean up the ULTRA environment and environment test

* Add note to RLlib training about SMARTS observations adaptation

* Update ULTRA environment documentation

* update MANIFEST.in (#956)

* fix multi-display envision

* prevent envision to reconnect to a simulation every 3 second

* prevent envision to reconnect to a simulation every 3 second

* prevent envision to reconnect to a simulation every 3 second. bug fixes.

* Updated CHANGELOG.md

* Build and Update the envision distribution based on changes.

* Bug fixes. Major reformatting for .js files.

* build and update map

* fix envision to check for a new simulation every 3 seconds and not redirect when switched to a multi-instance display.

* build and update the distribution. Reformatting.

* typo fix

* changes based on reviews

* fork all light base tests and observe duration (#967)

* ULTRA Evaluate specific models (#915)

* refactor existing evaluate_saved_models

* fixed bug

* updated evaluation process, fixed tune test issue

* Update getting_started.md

* updated getting_started.md documentation

* clean up

* added exceptions

* small fix

Co-authored-by: christianjans <[email protected]>

Co-authored-by: christianjans <[email protected]>
Co-authored-by: christianjans <[email protected]>

* ULTRA baselines with new adapters (#958)

* Initial ideas for refactored adapter

* Define the reward and observation adapters

* Finish basic adapter types in adapter.py

* Get PPO baseline to run

* Get SAC baseline to run

* Get TD3 baseline to run

* Get RLlib training to work

* Get DQN baseline to run

* Get BDQN baseline to run

* Get ULTRA Tune to run

* Pass ULTRA CI tests

* Format the code

* Move adapters to own directory

* Remove original adapter and state preprocessors

* Add discrete action Gym space

* Implement default image observation adapter function

* Simplify required_interface_fromtypes function

* Initialize ultra_scores from enum type

* Comment constants in default vector and reward

* Change adapter CI test to use new adapters

* Use seed from parameters for social vehicle config in RLlib

* Add docstrings to adapters

* Convert TODO regarding ULTRA score to NOTE in ULTRA environments

* Fix small logic errors in default_observation_image_adapter

* Apply small changes from review

* Create deepcopy of observation before performing vector adaptation

* Add initial documentation for default adapters

* Add reason for sorting social vehicles by distance in adapters.md

* Keep consistent line length in adapters.md

* Add comments to image adapter constants

* Edit docstring of image adapter function

* Change image observation adapter to produce a 3D array

* Initial changes

* Fix bug in image replay buffer dataset

* Add initial replay buffer test

* Clean up replay buffer test

* Make CNNs exclusively process images

* Remove BDQN's explore.py and network.py

* Remove extra import of DQNWithSocialEncoder

* ULTRA Sanity check on baselines (#965)

* added test to train all baselines

* formatted

* added evaluation to baseline tests

* fix agent interface numbering (#978)

Co-authored-by: Rutvik Gupta <[email protected]>

* fixed genhistories bug introduced in PR #896.

* Graceful shutdown of zoo when daemon process terminates abruptly (#924)

* Update version number

Co-authored-by: Jeffer Jingfei Peng <[email protected]>
Co-authored-by: Stephen Hockema <[email protected]>
Co-authored-by: adai <[email protected]>
Co-authored-by: sah-huawei <[email protected]>
Co-authored-by: JenishPatel99 <[email protected]>
Co-authored-by: christianjans <[email protected]>
Co-authored-by: Rutvik Gupta <[email protected]>
Co-authored-by: Rutvik Gupta <[email protected]>
Co-authored-by: Alex Lewandowski <[email protected]>
Co-authored-by: christianjans <[email protected]>
Co-authored-by: Jenish Patel <[email protected]>
Co-authored-by: Adaickalavan Meiyappan 84166141 <[email protected]>
Co-authored-by: guptarut <https://markus.cs.teach.edu/git/csc209-2020-01/guptarut>
Co-authored-by: Valax Kong <[email protected]>
Gamenot added a commit that referenced this pull request Jul 22, 2021
* made a new etc folder and moved the third party folder into it

* moved tools folder to etc folder

* moved extras folder to etc

* moved tools folder to examples folder

* moved benchmark folder to etc folder

* moved benchmark folder to cases folder and updated import statements

* updated Makefile with proposed changes

* moved install_deps.sh to etc/setup

* updated Makefile based on changes proposed

* moved docker files to etc/docker folder

* fixed script paths in Makefile

* fixed script paths in ci files

* bug fix

* bug fix

* added recipe to remove coverageXXX and coverage.XXX files in Makefile

* added README.pypi.md to etc/setup

* fixed paths for dockerfile and made path changes in README.md

* updated CHANGELOG.md

* added __init__.py to scenarios and examples and removed them from pip installation in setup.py

* updated based on proposed changes

* revert back to absolute paths

* added __init__.py

* update CHANGELOG.md

* new Imitation action space (#854)

* first pass at new Imitation action space
also fixed bug for non-dynamic vehicles not getting actions

* Only do non-dynamic actions for agents not owned by a Provider

* use actual mass from chassis instead of hardcoding

* added hack to allow setting the initial vehicle speed

* don't use Sumo here by default

* added CHANGELOG entries

* update from review:  normalize by 4-wheel torque

* ULTRA Improve high density traffic (#783)

* experiment with different begin time functions

* fixed map position in gif

* added legends

* WIP: experimenting with different combinations of traffic settings

* save begin time settings

* added more maps to high-density task, constrict stopwatcher begin time and t-intersection distribution improved from high-density traffic

* formatted

* clean up

* final traffic settings saved

* added mid-density to compare, modified high-density distribution

* simplified the high density traffic to lessen congestion

* more tuning

* more tuning

* added video analysis test

* clean up

* Apply suggestions from code review

Co-authored-by: christianjans <[email protected]>

* changes from code review

* comment changes

* slight mod to traffic distribution & relaxed stopwatcher begin times

* Update begin_time_init_funcs.py

Co-authored-by: christianjans <[email protected]>

* remove debugging levels

* small fix

Co-authored-by: christianjans <[email protected]>

* Remove extra comma in ULTRA citation (#849)

* Remove extra comma in README citation

* Use period instead of comma

* revert back the file to prevent ci-test from failing for now

* bug fix

* reproducing bug

* reproducing bug

* bug fix

* Fixed the bug by turning off the wrong_way event when vehicle goes into an intersection.
Updated CHANGELOG.md.

* Traffic History Dones (#827)

* better handling of Dones for traffic history
- detect vehicles dropping out of history
- added ExitGoal for imitation learning agents

* Updated CHANGELOG.

* back out deprecation fix

* allow for collisions to be reported in Events even if goal reached

* Changed ExitGoal to TraverseGoal.
Backed out semantic change to done Events.
(feedback from dicussions)

* type hints

* updates from review & formatting

* merge

* Multiple replacement of history vehicles (#836)

* First pass at multi-agent IL example

* choose only overlapping vehicles to replace
also, refactored TrafficHistory to clean up database queries

* moved TraffiCHistory class to its own file

* minor none check for replaced history vehicles

* refactored overlapping_choice into TrafficHistory

* updates from review

* allow -k as a shortcut for --replacements-per-episode

* formatting

* added some type hints

* more type hints

* updates from review

* updates from review

* formatting

* more type hints

* fixed weird bug in last PR

* updated based on changes proposed

* updated based on changes proposed

* updated based on changes proposed

* removed the additional files to reproduce the bug

* refactoring

* reformatting sensors.py

* reformatted sensors.py through black

* updated CHANGELOG.md

* added max-steps arg (#861)

* Fix permission error.

* moved the script etc/setup folder

* ULTRA Simple level (#857)

* added simple level

* classified simple levels, position offsets

Classified simple levels into v0, v1, v2. Move the position offsets to route distribution

* small modification

* pos_offset not mandatory

* tweaked distribution flags & formatted

* moved cross intersection types to test section in levels

* bubbles flags added

* renamed simple distribution, added a more general simple level

* reinstated blocks distribution

* Apply suggestions from code review

Co-authored-by: christianjans <[email protected]>

* moved debugging levels from task1 -> taskX

Co-authored-by: christianjans <[email protected]>

* update based on proposed changes

* path fix

* reformatted file using black

* renamed etc folder to conf, moved README.pypi.md to utils/setup and supervisord.conf to examples

* renamed cases to baselines

* removed CONTRIBUTING.md from docs and updated the top level one

* fixed CI test path

* os path fix

* reformatting file using black

* Bugfix memory issues (#852)

* Cap threadpoolexecutor virtual memory growth

* Fix sumo memory growth

* Make format

* Apply suggestions

* Update reset of sumo to every 50

* Add fixes to changelog

* TODO to remove fix when memory growth fixed

* revert back to 4 grpc connection workers

* Make format

* Bugfix remove unused `make` pview (#845)

* Remove pview for unused .egg files

* Update  changelog

* refactored repeating code to a class method

* updated CHANGELOG.md

* reformatted code

* removed unit test file from another branch

* ULTRA Update existing maps (#868)

* update existing maps

* formatted

* changes from review

* only observe cars for imitation learning (#874)

* only observe cars for imitation learning data collection

* added type hint

* revert to absolute paths

* prevent pybullet from updating during setup with python3.8

* updated CONTRIBUTING.md

* resolve merge issue

* ULTRA Add medium level (#869)

* added medium level

* adjusted traffic distr. in medium level

* removed curvy_t intersection type

* updated simple level

moved existing simple level into taskX

* cleaned up taskX config

* changed level's total

* Update ultra/ultra/scenarios/taskX/config.yaml

Co-authored-by: christianjans <[email protected]>

* updated simple level

Co-authored-by: christianjans <[email protected]>

* updated CHANGELOG.md

* removed unwanted packages

* updated requirements.txt

* updated CHANGELOG.md

* Changes based on reviews

* Created a seperate setup.py for benchmark to remove opencv-python from SMARTS in general.

* updated requirements.txt

* updated requirements.txt

* updated requirements.txt

* examples and bug fixes for imitation learning (#878)

* examples and bug fixes for imitation learning

* added PR number to CHANGELOG

* took out debugging hack

* use BoxChassis (kinematics only, no physics) by default for Imitation action space

* modified placeholder agent to replay from saved pkl files.
+-get starting speed for mission, bug fixes

* formatting

* remove unnecessary dependencies

* better rounding for history time query

* do collision processing for non-dynamic action spaces too

* fixed overzelous removal of provider type check + updates from review

* added a few more type hints

* reverted more over-zealousness re provider merging

* fixed minor bug for when speed==0.

* updates from review:  better timestep_sec rounding

* backed out Observation change + misc updates from review

* re-compute traffic history speeds based on actual positions

* Moved speed re-computation to genhistories to get out of step loop.
   - use next pos instead of prev pos in speed computation
Fixed minor bug with obs_time hack.

* don't check position on first step

* enforce vehicle history limit to cars

* fix for isclose() near 0

* move filtering by position to the end of genhistories (so all are used in smoothing stuff for edge effects)

* change back to scalar acceleration for Imitation action space

* formatting

* use current and next pos to compute history speed

* record and save the first observation (prior to step) too

* fixed history replay 1-off timestep issue
also added mission start adjustment hack for front bumper

* ULTRA add `--durations` flag to ULTRA CI tests (#885)

* added durations flag

* test pypi ultra test

* minor name fix

* history agent vehicle sizing (#886)

* allow traffic history agent vehicles' sizes to be set

* simplified controller calculations (should not change them)

* oops

* use angular_velocity for position updates too

* use current angular_velocity instead of next

* reverted angular_velocity correction to position in controller
also fixed bug to prevent stepping pybullet twice

* Refactor Waypoints (#872)

* waypoints/lanepoits refactor:  first pass

* incremental

* move lanepoints into sumo_road_network

* moved Waypoints (back) into MissionPlanner

* added some type hints

* minor cleanup

* updated comment

* added WaypointsCache and other minor performance optimizations

* debugged waypoints cache

* removed no-longer used method

* updates from review

* fixed typos

* reduced lane-following lookahead to 10

* revert lane_following_controller lookahead reduction

* added CHANGELOG entry

* update per review:  fixed hash for LinkedLanePoints

* added more type hints per review

* remove start/end offset from simple level (#891)

* Proper shutdown of RemoteAgentBuffer after code crash (#822)

* Removed atexit destroy in RemoteAgentBuffer.

* fix internal holes in sumo road network

* Updated CHANGELOG.md

* code reformatting

* code reformatting

* comments

* fixed all holes that were at extremely sharp turn (almost perpendicular).

* traffic-history data speed and heading tweaks. (#896)

* re-calculate speeds and headings based on position changes for both NGSIM and INTERACTION datasets

* comment

* ULTRA Update `docs/setup.md` (#903)

* updated setup.md

* remove manual black installation step

* added install_deps.sh into ultra

* Update ultra/docs/setup.md

Co-authored-by: christianjans <[email protected]>

* empty commit

Co-authored-by: christianjans <[email protected]>

* added an experiment utility file to replace context of supervisord.conf

* reformatting

* removed supervisord from dependencies and requirements

* Ensured unique deque objects were used in framestack. (#894)

* Updated README.md

* updated CHANGELOG.md

* updated requirements.txt

* updated requirements.txt

* updated requirements.txt

* resolving merge conflict

* resolving merge conflict

* resolving merge conflict

* path fixes

* path fixes

* Fix args count error caused by `websocket` (#906)

* Fix vargs error sometimes caused by websocket

* Change vargs to 2 additional defaults

* Add fix to changelog

* ignore options not defined in the command

* reformatting

* open new web browser tab automatically

* reformatting

* added scl zoo command to installl agents at the specified paths

* Updated CHANGELOG.md

* update tensorflow for Rl_Agent

* Update getting_started.md (#925)

* update tensorflow for Rl_Agent

* added test file for rl-agent

* updated the wheel file for rl-agent installation

* updated based on reviews

* added another option to change port

* Small fix to docs/getting_started.md (#931)

* cleanup

* reformatting and more detail to error output

* reformatting and more detail to error output

* bump up the version number, update scenarios for rl-agent

* updated wheel file for rl-agent

* updated CHANGELOG.md

* updated README.md and cleanup the environment before installing the agents.

* updated README.md and cleanup the environment before installing the agents.

* Add flag to disable mission shuffling when generating scenarios in ULTRA (#927)

* Add option to generate scenarios without shuffling missions

* Add comments to mission shuffling tests

* Fix comments' flag names

* Warning if port passed without starting envision.

* Warning if port passed without starting envision.

* remove argument parser (#935)

* refactoring

* revert changes

* bug fix

* bug fix

* ULTRA Migrate from step-based to episode-based sampling (#932)

* change agent_itr to episode.index

* formatted

* recording data episodically in tune.py and train.py

* change recording_step inside evaluate_saved_model()

* added episode indices test

* Update ultra/tests/test_evaluate.py

Co-authored-by: christianjans <[email protected]>

* Update ultra/tests/test_evaluate.py

Co-authored-by: christianjans <[email protected]>

Co-authored-by: christianjans <[email protected]>

* replace the panda3d.Quat.xform method to remove dependency from panda3D package

* wrap the import statements and ShowBaseInstance class in try block and warn user if they have not installed the [render] dependencies.

* make sure the CI tests install dependencies before rendering camera observations

* remove panda3d from dependencies in setup.py

* Updated CHANGELOG.md

* ULTRA Run tests in forked subprocesses (#937)

* forked train test

* remove backslash

* try forking evaluate test

* small fix

* small fix

* small fix

* comment added

* update documentation about rendering and camera based observations

* moved helper functions to utils/math

* reformat the try block to raise RendererException with warning message. Comments.

* rename the dependency name from render to camera-obs

* Multi-agent FrameStack wrapper (#916)

* Added multi-agent FrameStack wrapper and test.

* cleaner way to make renderer optional

* formatting

* Refactor ULTRA adapter to support benchmarking (#871)

* Initial ideas for refactored adapter

* Define the reward and observation adapters

* Finish basic adapter types in adapter.py

* Get PPO baseline to run

* Get SAC baseline to run

* Get TD3 baseline to run

* Get RLlib training to work

* Get DQN baseline to run

* Get BDQN baseline to run

* Get ULTRA Tune to run

* Pass ULTRA CI tests

* Format the code

* Move adapters to own directory

* Remove original adapter and state preprocessors

* Add discrete action Gym space

* Implement default image observation adapter function

* Simplify required_interface_fromtypes function

* Initialize ultra_scores from enum type

* Comment constants in default vector and reward

* Change adapter CI test to use new adapters

* Use seed from parameters for social vehicle config in RLlib

* Add docstrings to adapters

* Convert TODO regarding ULTRA score to NOTE in ULTRA environments

* Fix small logic errors in default_observation_image_adapter

* Apply small changes from review

* Create deepcopy of observation before performing vector adaptation

* Add initial documentation for default adapters

* Add reason for sorting social vehicles by distance in adapters.md

* Keep consistent line length in adapters.md

* Add comments to image adapter constants

* Edit docstring of image adapter function

* Change image observation adapter to produce a 3D array

* Test adapter's Gym space in adapter tests

* Change gray-scale weighting to (0.1, 0.8, 0.1)

* Fix 'enironment' typo and describe the_environment_reward in docs/adapters.md

* Keep variable name of the rewards obtained from the environment consistent

* User assertIn instead of assertTrue for testing containing in test_adapter.py

* Add default info adapter to remove reward adapter's NeighborhoodVehicles dependency (#902)

* Initial changes

* Format the code

* Remove ultra_scores from the ULTRA environment

* Add info adapter documentation

* Add info adapter test

* Move shared adapter constants a common file

* Make trimming of extra social vehiccles explicit

* Replace RLlib environment info adaptation with default info adapter in agent

* minor bug fix. Reformatting

* Say which tests are run in ULTRA CI tests rather than use `--ignore` (#941)

* Explicitly say which tests are run in heavy and light

* Fix 'analysys' spelling mistake

* Add ray[rllib] to test and train dependencies and remove it from the main dependencies

* Request benchmark to install smarts[train] dependencies

* Import warning for ray dependent examples

* import warnings for ray dependent example tools

* Request benchmark module to install dependencies before running

* rl-agent to explicitly install ray dependency since its moved to [train] now

* update wheel file of rl_agent

* comments to ray dependent examples

* updated CHANGELOG.md

* added multi_instance example without ray

* formatting

* cleanup. Updated CHANGELOG.md

* added test for multi_instance without ray example

* ULTRA Minimalize `train.py` script (#904)

* Initial ideas for refactored adapter

* Define the reward and observation adapters

* Finish basic adapter types in adapter.py

* Get PPO baseline to run

* Get SAC baseline to run

* Get TD3 baseline to run

* Get RLlib training to work

* Get DQN baseline to run

* Get BDQN baseline to run

* Get ULTRA Tune to run

* Pass ULTRA CI tests

* Format the code

* Move adapters to own directory

* Remove original adapter and state preprocessors

* Add discrete action Gym space

* Implement default image observation adapter function

* Simplify required_interface_fromtypes function

* Initialize ultra_scores from enum type

* Comment constants in default vector and reward

* Change adapter CI test to use new adapters

* Use seed from parameters for social vehicle config in RLlib

* Add docstrings to adapters

* Convert TODO regarding ULTRA score to NOTE in ULTRA environments

* Fix small logic errors in default_observation_image_adapter

* Apply small changes from review

* Create deepcopy of observation before performing vector adaptation

* Add initial documentation for default adapters

* save work

* moved parsing outside of main

* made build_agent() public

* empty commit

* added max_steps args

* empty commit

* small fix

* changes from code review

* small fix

* bypass hard coded file name

* clean up

Co-authored-by: christianjans <[email protected]>

* Add trajectory interpolation provider.

* Update scenario building documentation and arguments in ULTRA (#944)

* Fix scl scenario build command in docs

* added default value to pool_dir arg

* make path relative to base ultra dir

* update scenario README

* add logic clause to allow build_scenarios() function calls to not mandate using pool_dir argument

* Change pool_dir initialization in build_scenarios

Co-authored-by: Jenish Patel <[email protected]>

* Add frame stacking to ULTRA (#948)

* Initial changes

* Add initial environment documentation

* Fix ULTRA environment and adapter test to pass tests

* Clean up the ULTRA environment and environment test

* Add note to RLlib training about SMARTS observations adaptation

* Update ULTRA environment documentation

* update MANIFEST.in (#956)

* fix multi-display envision

* prevent envision to reconnect to a simulation every 3 second

* prevent envision to reconnect to a simulation every 3 second

* prevent envision to reconnect to a simulation every 3 second. bug fixes.

* Updated CHANGELOG.md

* Build and Update the envision distribution based on changes.

* Bug fixes. Major reformatting for .js files.

* build and update map

* fix envision to check for a new simulation every 3 seconds and not redirect when switched to a multi-instance display.

* build and update the distribution. Reformatting.

* typo fix

* changes based on comments

* Update tensorflow to 2.2.1 and bump up the agent's version to 1.0

* give recognition to creator and add huawei disclaimer header to all files

* changes based on reviews

* changes based on reviews

* changes based on reviews

* disable eager execution

* remove rayless_multi_instance.py

* fork all light base tests and observe duration (#967)

* changes based on reviews

* ULTRA Evaluate specific models (#915)

* refactor existing evaluate_saved_models

* fixed bug

* updated evaluation process, fixed tune test issue

* Update getting_started.md

* updated getting_started.md documentation

* clean up

* added exceptions

* small fix

Co-authored-by: christianjans <[email protected]>

Co-authored-by: christianjans <[email protected]>
Co-authored-by: christianjans <[email protected]>

* ULTRA baselines with new adapters (#958)

* Initial ideas for refactored adapter

* Define the reward and observation adapters

* Finish basic adapter types in adapter.py

* Get PPO baseline to run

* Get SAC baseline to run

* Get TD3 baseline to run

* Get RLlib training to work

* Get DQN baseline to run

* Get BDQN baseline to run

* Get ULTRA Tune to run

* Pass ULTRA CI tests

* Format the code

* Move adapters to own directory

* Remove original adapter and state preprocessors

* Add discrete action Gym space

* Implement default image observation adapter function

* Simplify required_interface_fromtypes function

* Initialize ultra_scores from enum type

* Comment constants in default vector and reward

* Change adapter CI test to use new adapters

* Use seed from parameters for social vehicle config in RLlib

* Add docstrings to adapters

* Convert TODO regarding ULTRA score to NOTE in ULTRA environments

* Fix small logic errors in default_observation_image_adapter

* Apply small changes from review

* Create deepcopy of observation before performing vector adaptation

* Add initial documentation for default adapters

* Add reason for sorting social vehicles by distance in adapters.md

* Keep consistent line length in adapters.md

* Add comments to image adapter constants

* Edit docstring of image adapter function

* Change image observation adapter to produce a 3D array

* Initial changes

* Fix bug in image replay buffer dataset

* Add initial replay buffer test

* Clean up replay buffer test

* Make CNNs exclusively process images

* Remove BDQN's explore.py and network.py

* Remove extra import of DQNWithSocialEncoder

* ULTRA Sanity check on baselines (#965)

* added test to train all baselines

* formatted

* added evaluation to baseline tests

* fix agent interface numbering (#978)

Co-authored-by: Rutvik Gupta <[email protected]>

* fixed genhistories bug introduced in PR #896.

* Graceful shutdown of zoo when daemon process terminates abruptly (#924)

* Update version number

* Renamed folder.

* Deterministic route computation (#997)

* Panda3D rendering without X11 (#1016)

* Fix missing smarts.egg-info when mapping repository to /src

* Extend changes to headless dockerfile. (#1019)

* Add missing information to changelog

* Move along CHANGELOG

* Bump version 0.4.17->0.4.18

* Fix missing /dev/input and smarts.egg-info in singularity container (#1022)

* Move new CHANGELOGS to 0.4.18

Co-authored-by: Rutvik Gupta <[email protected]>
Co-authored-by: Rutvik Gupta <[email protected]>
Co-authored-by: Steve <[email protected]>
Co-authored-by: JenishPatel99 <[email protected]>
Co-authored-by: christianjans <[email protected]>
Co-authored-by: Stephen Hockema <[email protected]>
Co-authored-by: Adaickalavan Meiyappan 84166141 <[email protected]>
Co-authored-by: guptarut <https://markus.cs.teach.edu/git/csc209-2020-01/guptarut>
Co-authored-by: adai <[email protected]>
Co-authored-by: christianjans <[email protected]>
Co-authored-by: Valax Kong <[email protected]>
Co-authored-by: Jenish Patel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants