Repository navigation
Conversation
…d performance table
Owner
|
Nice work! |
Owner
|
Quick integration note: I added a few follow-up commits to make the CI matrix reliable. THey isolate lifecycle-sensitive wx.App tests on macOS, remove obsolete pytest coverage-warning filters that blocked macOS 3.9 collection, and restore the pre-existing Windows installation documentation so the compatibility work remains scoped to CI. Full CI is now green. |
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.
Summary
Author and primary contributor: Alexander Chumak
Integration and testing refinements: Bobby Tomlinson
This PR extends LabGym’s categorizer-evaluation workflow with interactive diagnostics, advisory triage, and representative embedding-based examples.
Changes
Interactive Model Diagnostics Window
Problem
Previously, evaluating a categorizer model via
test_categorizerprinted a static performance table in the terminal displaying precision, recall, F1-scores, and support values. Users had no practical visual or interactive way to analyze systematic confusions or inspect misclassified samples.Implementation
Developed
AutomatedDiagnosticsDialoginside the testing pipeline. When evaluation finishes, an interactive window displays a color-mapped confusion matrix with toggleable raw count and normalized (%) views, a natural language insight engine ranking confusions by frequency or proportion, and metric highlight filters for F1, precision, and recall.Impact
Provides researchers with an immediate, visual diagnosis of model performance directly inside LabGym, making error patterns transparent without forcing users to parse raw text tables or manually compile confusion data.
Interactive Triage Assignment & Action Plan PDF
Problem
Identifying model weaknesses previously left users with no clear path forward on how to fix errors, such as determining whether to collect more training data, combine visually identical classes, or isolate unannotated behaviors.
Implementation
Built
TriageBuilderDialog, providing a multi-select transfer interface where users assign systematic confusion pairs to three advisory hypotheses: Hypothesis 1 (potentially overlapping behavior definitions), Hypothesis 2 (possible labeling or class-definition issue requiring manual review), and Hypothesis 3 (insufficient independent training evidence for otherwise distinct behaviors). Integrated ReportLab to render a structuredTriage_Action_Plan.pdfcontaining highlighted confusion patterns, plain-language descriptions, suggested follow-up steps, and visual sample references. Integrated ReportLab to headlessly render a structuredTriage_Action_Plan.pdfreport containing highlighted confusion patterns, layman descriptions of each error, explicit remediation steps, and extracted visual sample references.Impact
Provides a structured follow-up plan that helps non-ML researchers investigate confusing predictions and decide how to refine their datasets.
High-Dimensional Feature Vector Centroids via Cosine Similarity
Problem
When a model confused two behavior classes, users had no way of identifying a representative video example of that confusion versus a possible outlier frame artifact.
Implementation
Refactored
test_categorizerto extract feature embeddings from the network's penultimate layer (model.layers[-2]) alongside predictions during testing. Implemented a Cosine Similarity vector engine inget_centroidthat calculates the mathematical mean embedding for confusion clusters and true-positive baselines, returning the exact video/image sample closest to the vector center.Impact
Adds representative reference samples to the PDF report: the video or image examples closest to the mean embedding for selected confusion cells and true-positive groups. These samples help researchers inspect patterns for further review; they do not establish ground truth or determine what changes should be made to a dataset.
Testing
Focused automated tests: 70 diagnostics and triage tests passed on the prepared component branch.
Coverage: Raw and normalized confusion matrices, advisory summaries, hypothesis safeguards, test-source preservation, naming collisions, PDF/versioned-package creation, dependency failures, and partial-failure reporting.
Manual testing: Executed local categorizer evaluation passes and verified dialog rendering, multi-select assignment, sample-reference extraction, and PDF generation in
LabGym_Diagnostics/.Known limitations: The interactive dialogs require a desktop wxPython environment. The original test-example folder remains unchanged; any diagnostic copy is for inspection only and is not automatically suitable as training data. Researchers must independently curate training data, retrain, and re-evaluate.
Known limitations: The interactive triage interface requires a desktop display environment (
wxPython); headless execution bypasses the dialog while retaining automated logging.