-
Notifications
You must be signed in to change notification settings - Fork 4
implement training report #260
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR replaces terminal output during classifier training with a modal dialog that displays formatted training reports. Reports are automatically saved as Markdown files in the project's jabs/training_logs/ directory for documentation and comparison purposes.
Key changes:
- New training report dialog that displays HTML-formatted performance metrics
- Training report generation system that creates Markdown and HTML reports
- Removal of all print statements from the training process
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/jabs/ui/training_thread.py | Removed print statements; added report generation and HTML emission |
| src/jabs/ui/training_report.py | New dialog component for displaying training reports |
| src/jabs/ui/central_widget.py | Connected training report signal and displays dialog after training |
| src/jabs/classifier/training_report.py | New module with report generation functions and data structures |
| src/jabs/classifier/classifier.py | Refactored feature importance into reusable getter method |
| src/jabs/classifier/init.py | Exported new training report classes and functions |
| src/jabs/project/project_paths.py | Added training_log_dir property and directory creation |
| src/jabs/project/session_tracker.py | Removed unused fbeta_notbehavior parameter |
| src/jabs/resources/docs/user_guide/gui.md | Documented new training report feature |
| src/jabs/resources/docs/user_guide/project-setup.md | Documented jabs/training_logs directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rt that have special meaning in Markdown; remove unused parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…o clipboard button to training report dialog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Add Training Report Dialog & Window Menu
Summary
Replaces terminal output during classifier training with a non-modal dialog that displays training performance metrics. Training reports are also saved as Markdown files in the project for documentation and comparison purposes. Additionally, adds a Window menu for improved window management across JABS.
Changes
New Features
Training Report Dialog (
src/jabs/ui/training_report.py)QWebEngineViewto display HTML-formatted training reportsTraining Report Generation (
src/jabs/classifier/training_report.py)TrainingReportDatadataclass for structured training informationCrossValidationResultdataclass for individual CV iteration resultsgenerate_markdown_report()- Creates Markdown-formatted reports with timestampsave_training_report()- Saves reports to diskWindow Menu (
src/jabs/ui/main_window.py)Modified Components
TrainingThread (
src/jabs/ui/training_thread.py)print()statementstraining_reportsignal that emits Markdown contentjabs/training_logs/Grooming_20260102_143022_training_report.md)CentralWidget (
src/jabs/ui/central_widget.py)training_reportsignal to new_on_training_report()slot_training_thread_complete()to display or update training report dialogget_open_dialogs()public method for Window menu integrationTrainingReportDialog (
src/jabs/ui/training_report.py)_markdown_to_html()methodupdate_content()method to refresh dialog with new training resultsUserGuideDialog (
src/jabs/ui/user_guide_dialog.py)WindowType.Toolflag to prevent staying on top of other JABS windowsDocumentation Updates
gui.md
keyboard-shortcuts.md
Cmd+with⌘symbolproject-setup.md
jabs/training_logsdirectory documentationTests
tests/classifier/test_training_report.py- 18 tests for report generation and savingtests/ui/test_training_report_dialog.py- 13 tests for dialog UI componentsTraining Report Contents
Each training report includes:
Window Management Improvements
The new Window menu provides:
Benefits
Screenshots
Testing
jabs/training_logs/Linked Issues
Closes #140