-
Notifications
You must be signed in to change notification settings - Fork 123
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
Ctrl+C Doesn't Exit Benchmark #313
Labels
bug
Something isn't working
Comments
Yes, while running benchmark we are using multiple threads - we do not steer them in 100% clean way - hence the SIGINT signal is not causing graceful termination. I will have an eye on that. |
hvaria
added a commit
to hvaria/inference
that referenced
this issue
Mar 15, 2024
…rocess This pull request addresses bug roboflow#313, where users were unable to interrupt the benchmarking process using Ctrl+C, leading to a scenario where the benchmark would continue running indefinitely, ignoring interruption requests. The core of the issue was the absence of a proper signal handling mechanism for keyboard interrupts during the execution of the benchmarking commands. Added a try-except block around the benchmarking execution commands in benchmark.py. This ensures that a KeyboardInterrupt (e.g., through Ctrl+C) is caught, and a graceful shutdown sequence can be initiated. Upon catching a KeyboardInterrupt, the script now calls stop_inference_containers() from container_adapter.py. This function halts all running inference containers, ensuring that no orphaned resources are left consuming system resources post-interruption. Enhanced stop_inference_containers() to handle both interactive and automated environments gracefully.
yeldarby
added a commit
that referenced
this issue
Mar 15, 2024
Fix for Bug #313: Ensure Graceful Interruption of Benchmark Process
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Search before asking
Bug
I got a configuration error so want to exit the CLI benchmark before it finishes but Ctrl+C doesn't do anything. It just keeps going.
Environment
Environment
pytorch/pytorch:2.2.0-cuda12.1-cudnn8-devel
docker with after runningpip install inference-gpu
Minimal Reproducible Example
Then try
Ctrl+C
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: