Fix frozen single file on large result table - #998
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are well-scoped, include targeted regression tests, and the new localization keys are consistently added across all language files.
Pull request overview
This PR addresses a GUI usability/performance issue where the single-file results table can freeze the GUI when rendering very large result sets, and it tightens/clarifies inference behavior and documentation around confidence thresholds, Perch normalization, and resumable analyses.
Changes:
- Cap the single-file GUI results table to the top-scoring detections (with a localized warning) to avoid Gradio dataframe rendering stalls.
- Normalize Perch inference scores via softmax and add a shared
min_confvalidator to prevent “threshold=1.0 yields empty results” misconfiguration. - Expand user-facing docs for resumable directory analysis (CLI + GUI) and add the required localization keys across all languages.
File summaries
| File | Description |
|---|---|
| tests/test_model_utils.py | Adds coverage for validate_min_conf and verifies Perch inference uses softmax normalization. |
| tests/gui/test_single_file_table.py | New GUI test ensuring large single-file result sets are truncated correctly and warnings are emitted. |
| docs/usage/gui.rst | Documents pause/resume behavior for batch analyses in the GUI and points to implementation details. |
| docs/usage/cli.rst | Notes that directory analyses are resumable and links to the detailed design doc. |
| docs/implementation-details/resumable-analysis.rst | New detailed design/behavior documentation for resumable analysis journaling and matching rules. |
| docs/implementation-details.rst | Adds the new resumable-analysis doc to the implementation-details toctree. |
| birdnet_analyzer/model_utils.py | Adds validate_min_conf, updates Perch description, and passes apply_softmax for Perch sessions. |
| birdnet_analyzer/lang/en.json | Adds new localized strings for “preparing model” and truncated single-file results warning. |
| birdnet_analyzer/lang/de.json | Adds translations for the new progress + truncation warning strings. |
| birdnet_analyzer/lang/fr.json | Adds translations for the new progress + truncation warning strings. |
| birdnet_analyzer/lang/fi.json | Adds translations for the new progress + truncation warning strings. |
| birdnet_analyzer/lang/id.json | Adds translations for the new progress + truncation warning strings. |
| birdnet_analyzer/lang/pt-br.json | Adds translations for the new progress + truncation warning strings. |
| birdnet_analyzer/lang/ru.json | Adds translations for the new progress + truncation warning strings. |
| birdnet_analyzer/lang/se.json | Adds translations for the new progress + truncation warning strings. |
| birdnet_analyzer/lang/tlh.json | Adds translations for the new progress + truncation warning strings. |
| birdnet_analyzer/lang/zh_CN.json | Adds translations for the new progress + truncation warning strings. |
| birdnet_analyzer/lang/zh_TW.json | Adds translations for the new progress + truncation warning strings. |
| birdnet_analyzer/gui/utils.py | Updates download-progress UX to show a localized “preparing model” state once download completes. |
| birdnet_analyzer/gui/single_file.py | Implements MAX_TABLE_ROWS truncation for single-file results with a localized warning. |
| birdnet_analyzer/cli.py | Clarifies --min_conf help text, especially for Perch softmax confidence interpretation. |
| birdnet_analyzer/analyze/core.py | Enforces min_conf validity early in analysis via the new validator. |
Review details
- Files reviewed: 22/22 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.