Processes not terminated
See original GitHub issueBUG REPORT
High Level Description I use SMARTS for training imitation learning agents with NGSIM dataset. When training is finished, SMARTS will leave some unterminated processes.
SMARTS version 0.4.15
Steps to reproduce the bug
I use the multiprocessing
package to open multiple SMARTS instances for parallel sampling.
And I created each simulator using:
self.smarts = SMARTS(
agent_interfaces={},
traffic_sim=None,
visdom=None,
envision=None,
zoo_addrs=None,
)
Resulting and expected behaviour
There are multiple processes like smarts/zoo/worker.py --port xxxxx
not terminated after the training stops.
Error logs and screenshots
System information
- Operating system & Environment [Please note if using Docker]: Ubuntu 16.04
- Python version [Please note if using Jupyter] 3.7.3
- SUMO version 1.8.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Why the process is not terminated? - python - Stack Overflow
A Python process will end when there are no more running non-daemon threads. If you pass the daemon=True argument to threading.
Read more >WSL2: server process not terminated on exit #699 - GitHub
In WSL2, the VS Code Server process is not terminated when the VS Code instance is closed, and it is not reused when...
Read more >Terminating a Process - Win32 apps | Microsoft Learn
If a process is terminated by TerminateProcess, all threads of the process are terminated immediately with no chance to run additional code.
Read more >Unable to terminate process, The operation could not be ...
At times, you may find that you are not able to kill a particular process using the Windows Task Manager, and when you...
Read more >The Process PID xxxx could not be terminated. Access denied
Sometimes when attempting to Kill a Process in Windows you may receive the following message: “ERROR: The Process with PID xxxx could not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Zbzhu99,
We have now created
ParallelEnv
class to simulate multiple SMARTS environments in parallel, with synchronous or asynchronous episodes, to collect observations at a faster rate.See pull request #1087 for details.
You may consider using
ParallelEnv
class to run mulitple SMARTS for parallel rollouts, instead of writing your own code. We hope this new feature would be helpful and simplify your usage of SMARTS.Closed by pull request #924 .