Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .context/IMPLEMENTATION_FIXES.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This document summarizes the fixes applied to address issues identified during t

**Files Modified:**
- `src/msquant/app/pages/monitor.py` - Complete rewrite with charts
- Imports `nicegui_highcharts.HighChart` with graceful fallback
- Uses `ui.highchart()` from NiceGUI (after installing nicegui-highcharts plugin)
- GPU selector dropdown for multi-GPU systems
- Four real-time charts:
- GPU Utilization (0-100%)
Expand All @@ -62,7 +62,7 @@ This document summarizes the fixes applied to address issues identified during t
**Features:**
- Responsive 2-column grid layout
- Auto-refreshing every second
- Graceful degradation if nicegui-highcharts unavailable
- Requires nicegui-highcharts plugin to be installed
- Cancel button now disabled when job not running

---
Expand Down Expand Up @@ -193,10 +193,11 @@ Chart update cycle:
5. Update chart: `chart.options['series'][0]['data'] = new_data`
6. Call `chart.update()` to re-render

Graceful fallback:
- Imports `HighChart` with try/except
- Shows warning message if plugin unavailable
- Text summary still works without charts
Installation note:
- The `nicegui-highcharts` plugin must be installed via pip
- After installation, it adds `ui.highchart()` to NiceGUI's API
- No direct import of `HighChart` class is needed
- Charts are created using `ui.highchart(config_dict).classes('w-full')`

---

Expand Down
15 changes: 7 additions & 8 deletions src/msquant/app/pages/monitor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Monitor page for tracking job progress and GPU metrics."""
from nicegui import ui
from nicegui_highcharts import HighChart # type: ignore[import-untyped]

from msquant.services import JobService
from msquant.core.monitoring import GPUMonitor
Expand Down Expand Up @@ -51,22 +50,22 @@ def create_monitor_page(job_service: JobService, gpu_monitor: GPUMonitor):

with ui.grid(columns=2).classes('w-full gap-4'):
# Utilization chart
util_chart = HighChart(
util_chart = ui.highchart(
build_line_chart("GPU Utilization", "Utilization", "%", y_max=100)
).classes('w-full')

# Memory chart
mem_chart = HighChart(
mem_chart = ui.highchart(
build_line_chart("GPU Memory", "Memory", "%", y_max=100)
).classes('w-full')

# Temperature chart
temp_chart = HighChart(
temp_chart = ui.highchart(
build_line_chart("GPU Temperature", "Temperature", "°C")
).classes('w-full')

# Power chart
power_chart = HighChart(
power_chart = ui.highchart(
build_line_chart("GPU Power", "Power", "W")
).classes('w-full')

Expand Down