feat: Enhance dashboard with charts, study report viewer, and pruning tracking
- Add ConvergencePlot component with running best, statistics, gradient fill - Add ParameterImportanceChart with Pearson correlation analysis - Add StudyReportViewer with KaTeX math rendering and full markdown support - Update pruning endpoint to query Optuna database directly - Add /report endpoint for STUDY_REPORT.md files - Fix chart data transformation for single/multi-objective studies - Update Protocol 13 documentation with new components - Update generate-report skill with dashboard integration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Atomizer Dashboard
|
||||
|
||||
**Last Updated**: November 23, 2025
|
||||
**Last Updated**: December 3, 2025
|
||||
|
||||
---
|
||||
|
||||
@@ -83,23 +83,50 @@ Displays algorithm information:
|
||||
- **Objectives Count**: Number of optimization objectives
|
||||
- **Design Variables Count**: Number of design parameters
|
||||
|
||||
### 3. Convergence Monitoring
|
||||
- **Convergence Plot**: Best value vs. trial number
|
||||
- **Real-time Updates**: WebSocket-driven live updates
|
||||
- **Pruned Trials**: Visual indication of pruned trials
|
||||
### 3. Convergence Plot (Enhanced)
|
||||
**File**: `atomizer-dashboard/frontend/src/components/ConvergencePlot.tsx`
|
||||
|
||||
### 4. Parameter Space Exploration
|
||||
- **2D Scatter Plot**: Design variable relationships
|
||||
- **Color Mapping**: Objective values mapped to color intensity
|
||||
- **Interactive Tooltips**: Trial details on hover
|
||||
Advanced convergence visualization:
|
||||
- **Dual-line plot**: Individual trial values + running best trajectory
|
||||
- **Area fill**: Gradient under trial values curve
|
||||
- **Statistics panel**: Best value, improvement %, 90% convergence trial
|
||||
- **Summary footer**: First value, mean, std dev, total trials
|
||||
- **Step-after interpolation**: Running best shown as step function
|
||||
|
||||
### 5. Trial History Table
|
||||
### 4. Parameter Importance Chart
|
||||
**File**: `atomizer-dashboard/frontend/src/components/ParameterImportanceChart.tsx`
|
||||
|
||||
Correlation-based parameter analysis:
|
||||
- **Pearson correlation**: Calculates correlation between each parameter and objective
|
||||
- **Horizontal bar chart**: Parameters ranked by absolute importance
|
||||
- **Color coding**: Green (negative correlation - helps minimize), Red (positive - hurts minimize)
|
||||
- **Tooltip**: Shows percentage importance and raw correlation coefficient (r)
|
||||
- **Minimum 3 trials**: Required for statistical significance
|
||||
|
||||
### 5. Study Report Viewer
|
||||
**File**: `atomizer-dashboard/frontend/src/components/StudyReportViewer.tsx`
|
||||
|
||||
Full-featured markdown report viewer:
|
||||
- **Modal overlay**: Full-screen report viewing
|
||||
- **Math equations**: KaTeX support for LaTeX math (`$...$` inline, `$$...$$` block)
|
||||
- **GitHub-flavored markdown**: Tables, code blocks, task lists
|
||||
- **Custom styling**: Dark theme with proper typography
|
||||
- **Syntax highlighting**: Code blocks with language detection
|
||||
- **Refresh button**: Re-fetch report for live updates
|
||||
- **External link**: Open in system editor
|
||||
|
||||
### 6. Trial History Table
|
||||
- Comprehensive list of all trials
|
||||
- Sortable columns
|
||||
- Status indicators (COMPLETE, PRUNED, FAIL)
|
||||
- Parameter values and objective values
|
||||
- User attributes (constraints)
|
||||
|
||||
### 7. Pruned Trials Tracking
|
||||
- **Real-time count**: Fetched directly from Optuna database
|
||||
- **Pruning diagnostics**: Tracks pruned trial params and causes
|
||||
- **Database query**: Uses SQLite `state = 'PRUNED'` filter
|
||||
|
||||
---
|
||||
|
||||
## API Endpoints
|
||||
@@ -286,6 +313,9 @@ atomizer-dashboard/
|
||||
│ │ │ ├── ParallelCoordinatesPlot.tsx # Multi-objective visualization
|
||||
│ │ │ ├── ParetoPlot.tsx # Pareto front scatter plot
|
||||
│ │ │ ├── OptimizerPanel.tsx # Strategy information
|
||||
│ │ │ ├── ConvergencePlot.tsx # Enhanced convergence chart
|
||||
│ │ │ ├── ParameterImportanceChart.tsx # Correlation-based importance
|
||||
│ │ │ ├── StudyReportViewer.tsx # Markdown report viewer
|
||||
│ │ │ ├── common/
|
||||
│ │ │ │ └── Card.tsx # Reusable card component
|
||||
│ │ │ └── dashboard/
|
||||
@@ -307,6 +337,15 @@ atomizer-dashboard/
|
||||
└── optimization.py # Optimization endpoints
|
||||
```
|
||||
|
||||
## NPM Dependencies
|
||||
|
||||
The frontend uses these key packages:
|
||||
- `react-markdown` - Markdown rendering
|
||||
- `remark-gfm` - GitHub-flavored markdown support
|
||||
- `remark-math` - Math equation parsing
|
||||
- `rehype-katex` - KaTeX math rendering
|
||||
- `recharts` - Interactive charts
|
||||
|
||||
---
|
||||
|
||||
## Data Flow
|
||||
@@ -368,7 +407,16 @@ if (!objectives || !designVariables) return <EmptyState />;
|
||||
|
||||
---
|
||||
|
||||
## Future Enhancements
|
||||
## Recent Updates (December 2025)
|
||||
|
||||
### Completed
|
||||
- [x] **Convergence Plot**: Enhanced with running best, statistics, and gradient fill
|
||||
- [x] **Parameter Importance Chart**: Correlation analysis with color-coded bars
|
||||
- [x] **Study Report Viewer**: Full markdown rendering with KaTeX math support
|
||||
- [x] **Pruned Trials**: Real-time count from Optuna database (not JSON file)
|
||||
- [x] **Chart Data Transformation**: Fixed `values` array mapping for single/multi-objective
|
||||
|
||||
### Future Enhancements
|
||||
|
||||
- [ ] 3D Pareto front visualization for 3+ objectives
|
||||
- [ ] Advanced filtering and search in trial history
|
||||
|
||||
Reference in New Issue
Block a user