Skip to content

Fix frozen single file on large result table - #998

Merged
Josef-Haupt merged 2 commits into
mainfrom
fix/frozen-single-file
Sep 7, 2026
Merged

Josef-Haupt merged 2 commits into
mainfrom
fix/frozen-single-file

Conversation

@Josef-Haupt

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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_conf validator 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.

@Josef-Haupt
Josef-Haupt merged commit dde1d19 into main Sep 7, 2026
11 checks passed
@Josef-Haupt
Josef-Haupt deleted the fix/frozen-single-file branch September 7, 2026 13:09
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.

2 participants