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

Ctrl c exception handling #150

Merged
merged 12 commits into from
Mar 1, 2023
Merged

Ctrl c exception handling #150

merged 12 commits into from
Mar 1, 2023

Conversation

JacobGlennAyers
Copy link
Contributor

Added in more predictable behavior when processing large datasets, allowing a user to stop the process via Ctrl-C

purovida94 and others added 6 commits February 16, 2023 19:55
KeyboardInterupt exceptions added to try-except blocks.

addition of assertions for checkVerbose
Moved KeyboardInterrupt exception before BaseException. Also added second "r" in "interrupt."
- also noticed a resampling typo that was deprecated due to the use of resampling rather than just downsampling
just for the only try-except block that needs it.
Copy link
Member

@sprestrelski sprestrelski left a comment

Choose a reason for hiding this comment

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

Both the system exits work for Microfaune and TweetyNet! Would you be able to implement this functionality for BirdNET as well? You may need to look into the birdnet_lite/analyze.py script as interrupting from generate_automated_labels may not stop the process. I would check out what the behavior currently looks like when trying (and failing) a KeyboardInterrupt, then tracing where the error message comes from.

Copy link
Contributor

@purovida94 purovida94 left a comment

Choose a reason for hiding this comment

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

@sprestrelski I added in some KeyboardInterrupt exceptions in to analyze.py. they're working on my end, let me know if they're working for you too. Gracias!

Copy link
Member

@sprestrelski sprestrelski left a comment

Choose a reason for hiding this comment

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

Looks good on my end 🤠

@JacobGlennAyers JacobGlennAyers merged commit 858714b into main Mar 1, 2023
@JacobGlennAyers JacobGlennAyers deleted the ctrl_c_exception_handling branch March 1, 2023 20:44
@JacobGlennAyers
Copy link
Contributor Author

Merged, thanks Teo!

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