Skip to content

feat: add Log Viewer to Web UI for browsing evaluation results#1191

Merged
Luodian merged 5 commits into
dev/v0d8from
feat/log-viewer
Feb 24, 2026
Merged

feat: add Log Viewer to Web UI for browsing evaluation results#1191
Luodian merged 5 commits into
dev/v0d8from
feat/log-viewer

Conversation

@Luodian
Copy link
Copy Markdown
Contributor

@Luodian Luodian commented Feb 23, 2026

Summary

Add a Log Viewer tab to the Web UI that lets users browse evaluation results stored in the local logs/ folder.

Features

Log Viewer Panel

  • Left panel: run list with model name, date, task badges, eval time
  • Right panel: metrics table (top) + paginated sample viewer (bottom)
  • Logs path configurable (default ./logs/), with scan button

On-Demand Image Loading

  • "Load Image" button on each sample card fetches images from HuggingFace datasets server by doc_id
  • Images rendered inline with column name label
  • Cached in component state to avoid re-fetching
  • Button hidden silently on load failure (no error noise)

Dataset Path Display

  • Shows HuggingFace dataset paths between Config and metrics table
  • Each entry is a clickable link to https://huggingface.co/datasets/{path}
  • Only displayed for HF-hosted datasets (local/json paths filtered out)

Backend Endpoints

  • GET /logs/runs - scan and list evaluation runs
  • GET /logs/runs/{run_id}/results - fetch results JSON for a run
  • GET /logs/runs/{run_id}/samples/{task} - paginated sample viewer
  • GET /logs/dataset-row - proxy to HuggingFace datasets server API

Bug Fixes

  • 401 retry: if HF_TOKEN is expired/invalid, automatically retries without token for public datasets
  • Fixed 404 error when switching between runs (stale task name race condition)
  • Enforced minimum 12px font size across all Log Viewer text (was 10px)

Files Changed

  • lmms_eval/tui/server.py - 4 new endpoints + HF 401 retry logic
  • lmms_eval/tui/web/src/LogViewer.tsx - New Log Viewer component (~775 lines)
  • lmms_eval/tui/web/src/App.tsx - Added "Log Viewer" tab
  • lmms_eval/tui/web/dist/ - Built frontend assets

Luodian and others added 5 commits February 23, 2026 19:10
Add a new Log Viewer tab to the existing Web UI that lets users browse
locally stored evaluation outputs from the logs directory.

Backend (server.py):
- GET /logs/runs - scan logs directory and list all evaluation runs
- GET /logs/runs/{run_id}/results - return full results JSON for a run
- GET /logs/runs/{run_id}/samples/{task} - paginated sample browsing
- Path traversal protection and proper error handling

Frontend:
- New LogViewer.tsx component with left panel (run list) + right panel
  (results metrics table, config summary, paginated sample viewer)
- Tab navigation in header to switch between Evaluate and Log Viewer
- Sample cards with color-coded sections: Input (neutral), Target (green),
  Filtered Responses (blue), plus metric badges
- Consistent styling with existing monochrome design system
Add Load Image button to each sample card in the Log Viewer.
Clicking it fetches the corresponding row from HuggingFace datasets
server API (by dataset_path, split, doc_id from task config) and
renders image columns inline. Images are cached in component state
to avoid re-fetching.

Backend: new GET /logs/dataset-row endpoint that proxies HF datasets
server API with optional Bearer token auth.

Frontend: configs field on RunResults interface, taskConfig memo,
loadSampleImage callback, violet-styled Load Image button, inline
image display with column name label, error display for failed loads.
@Luodian Luodian merged commit c2845bb into dev/v0d8 Feb 24, 2026
2 checks passed
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.

1 participant