Add Streamlit results dashboard for the pipeline - #14
Merged
Conversation
Adds an interactive dashboard that visualizes the pipeline's recorded outputs without re-running the heavy extraction stack: - dashboard/data_loader.py: pure-stdlib loaders/transforms for the committed evaluation metrics, per-stage benchmarks, cost analysis, drift data, and reports. Kept dependency-free so it is unit-testable. - dashboard/app.py: Streamlit UI with Overview / Benchmarks / Cost (Build vs Buy) / Distribution Drift / Reports views. Recorded benchmark failures are surfaced honestly rather than hidden. - requirements-dashboard.txt: lightweight deps (streamlit, plotly, pandas) independent of torch/docling, so the dashboard can run/deploy on its own. - tests/unit/test_dashboard_data.py: unit tests for the loader against both synthetic fixtures and the real committed data. - README: how to run and deploy the dashboard. A live "upload a PDF and parse" demo is intentionally omitted — the extraction stack is heavy and slow to host; the dashboard focuses on produced results. Verified: all 25 unit tests pass; all five dashboard pages render without exceptions via Streamlit's headless AppTest harness. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D68SAeZ9GofWeNdMwvuDwC
Makes the dashboard deployable to Streamlit Community Cloud without pulling in the heavy pipeline dependencies: - dashboard/requirements.txt: light deps (streamlit, plotly, pandas) placed next to the entrypoint. Community Cloud searches the entrypoint's directory before the repo root and uses the first dependency file it finds, so this is used instead of the heavy root requirements.txt. - .streamlit/config.toml: theme + server config at the repo root, which is where Community Cloud reads config from when the entrypoint is in a subdirectory. - Remove the now-redundant root requirements-dashboard.txt (single source of truth is dashboard/requirements.txt). - README: step-by-step Community Cloud deploy instructions and an explanation of the dependency-resolution behavior. Verified: config.toml parses, the app renders with it via AppTest, and all 25 unit tests still pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D68SAeZ9GofWeNdMwvuDwC
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
Adds an interactive results dashboard that visualizes what the DocuParse pipeline produces — evaluation metrics, per-stage benchmarks, build-vs-buy cost analysis, distribution drift, and the analysis reports.
It reads the pipeline's already-committed JSON/markdown outputs and does not re-run extraction, so it's lightweight and fully independent of the heavy stack (torch / Docling / layout models / OCR).
Why a dashboard and not a live "upload a PDF" demo
The extraction stack is heavy and takes minutes per document, which is a poor fit for an always-on hosted demo (and unreliable — the committed benchmark even shows a stage failure on one run). The dashboard focuses on the recorded results, which is the efficient, robust option. A live-parse tab could be added later behind a Docker image if desired.
What's included
dashboard/data_loader.py— pure-stdlib loaders/transforms (no Streamlit/pandas) for metrics, benchmarks, cost analysis, drift, and reports. Dependency-free so it's unit-testable.dashboard/app.py— Streamlit UI with five views: Overview, Benchmarks, Cost (Build vs Buy), Distribution Drift, Reports. Recorded benchmark failures are surfaced honestly rather than hidden, and the small/hand-built eval set is flagged as directional.requirements-dashboard.txt—streamlit/plotly/pandasonly, so it can run and deploy on its own (e.g. Streamlit Community Cloud).tests/unit/test_dashboard_data.py— unit tests for the loader against synthetic fixtures and the real committed data.streamlit run dashboard/app.py) and deploy.How to run
pip install -r requirements-dashboard.txt streamlit run dashboard/app.py # http://localhost:8501Testing
python -m pytest) — 15 existing + 10 new, and the loader tests run without the dashboard deps (so the fast CI gate covers them).AppTestharness; migrated to the currentwidth="stretch"API so there are no deprecation warnings.🤖 Generated with Claude Code
Generated by Claude Code