diff --git a/README.md b/README.md index 4c8a405..03c63e0 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,22 @@ Prompts and outputs aren't uploaded unless you explicitly attach them. **[Get started](#install)** · [Explore the demo](https://wildedge.dev/demo) · [Docs](https://docs.wildedge.dev) · [Website](https://wildedge.dev) -| Model performance | Events | Hardware | +| Model performance | Workflow trace | SQL editor | |:---:|:---:|:---:| -| Model health, latency, time to first token, and throughput | Inference and error events with model and device metadata | Thermal state, accelerator usage, and CPU throttling | +| Model health, latency, time to first token, and throughput | Named workflow step and inference timing in a trace waterfall | SQL query with stacked hourly inference volumes across local and cloud models | -*Demo sample data across WildEdge SDKs. Click a thumbnail for the full-size image, +*Illustrative sample data across WildEdge SDKs. Click a thumbnail for the full-size image, or [explore the read-only demo](https://wildedge.dev/demo).* +
+More screenshots: events and hardware + +| Events | Hardware | +|:---:|:---:| +| Inference and error events with model and device metadata | Thermal state, accelerator usage, and CPU throttling | + +
+ ## Install ```bash diff --git a/docs/images/README.md b/docs/images/README.md index b70fe17..c07d95d 100644 --- a/docs/images/README.md +++ b/docs/images/README.md @@ -20,3 +20,14 @@ Additional views in the News Reader demo: These sample views span WildEdge SDKs, including mobile hardware. They do not represent output from the Python quickstart. The README uses 180-pixel-wide thumbnails linked to the full-size images, with a separate live-demo link. + +- `demo-trace.jpg`: News Reader → Runs → demo-run-1. Shows a named step and + a local summarizer inference; this sample does not include a cloud call. +- `demo-sql.jpg`: a local screenshot-only composition of the dashboard's SQL + editor and chart result components. It shows query results computed with DuckDB + from generated fictional events, not the deployed offline demo or production + telemetry. See [sql-preview/README.md](sql-preview/README.md) to reproduce it. + +The opening row contains performance, trace, and SQL previews. Events and +hardware remain in a collapsed More screenshots section. All five thumbnails +are 180 pixels wide and open their full-size image. diff --git a/docs/images/demo-sql.jpg b/docs/images/demo-sql.jpg new file mode 100644 index 0000000..2aff736 Binary files /dev/null and b/docs/images/demo-sql.jpg differ diff --git a/docs/images/demo-trace.jpg b/docs/images/demo-trace.jpg new file mode 100644 index 0000000..a95e27f Binary files /dev/null and b/docs/images/demo-trace.jpg differ diff --git a/docs/images/sql-preview/DemoAnalytics.vue b/docs/images/sql-preview/DemoAnalytics.vue new file mode 100644 index 0000000..d69bd34 --- /dev/null +++ b/docs/images/sql-preview/DemoAnalytics.vue @@ -0,0 +1,40 @@ + + + diff --git a/docs/images/sql-preview/README.md b/docs/images/sql-preview/README.md new file mode 100644 index 0000000..ea06efc --- /dev/null +++ b/docs/images/sql-preview/README.md @@ -0,0 +1,27 @@ +# Reproduce the SQL screenshot + +This is an illustrative local preview, not a deployed demo feature or production +telemetry. The SQL runs against deterministic fictional events in DuckDB, and +the existing dashboard SqlExplorer and QueryResult components render the result. +No chart pixels or query results are fabricated independently of the query. + +Prerequisites: a wild-edge checkout with dashboard dependencies installed, Node, +and a Python environment containing DuckDB (the platform's `.venv` includes it). + +```bash +/path/to/wild-edge/.venv/bin/python prepare.py /path/to/wild-edge /private/tmp/sql-preview +cd /private/tmp/sql-preview +npm run typecheck +npm run build:demo +MOCKED_BE=true npm run preview -- --outDir dist-demo --host 127.0.0.1 --port 4180 +``` + +Open `http://127.0.0.1:4180/demo/wildedge-demolabs/news-reader/analytics?mode=sql` +at 1600 × 1100 and capture the full viewport. The preview uses the existing +compact chart layout to keep the query, axes, stacked bars, and legend visible. +The source checkout and production site are unchanged. + +`prepare.py` creates 12,876 events spanning 48 hours and three fictional model +workloads. It executes `query.sql` and checks that its 144 grouped rows account +for every generated event. `DemoAnalytics.vue` is a screenshot-only composition +of existing dashboard components; the editable SQL field does not execute queries. diff --git a/docs/images/sql-preview/prepare.py b/docs/images/sql-preview/prepare.py new file mode 100644 index 0000000..0654891 --- /dev/null +++ b/docs/images/sql-preview/prepare.py @@ -0,0 +1,76 @@ +"""Create an isolated, fictional SQL screenshot preview using the actual dashboard. + +Usage: python prepare.py /path/to/wild-edge /private/tmp/wildedge-sql-preview +Requires duckdb in the Python environment and installed dashboard node_modules. +""" + +import json +import math +import shutil +import sys +from datetime import datetime, timedelta +from pathlib import Path + +import duckdb + +source = Path(__file__).resolve().parent +repository = Path(sys.argv[1]).resolve() +destination = Path(sys.argv[2]).resolve() +if destination.exists(): + raise SystemExit( + "Choose a new preview directory; existing files are never replaced." + ) +shutil.copytree( + repository / "dashboard", + destination, + ignore=shutil.ignore_patterns("node_modules", "dist", "dist-demo", ".vite"), +) +(destination / "node_modules").symlink_to( + repository / "dashboard" / "node_modules", target_is_directory=True +) +connection = duckdb.connect() +connection.execute( + "CREATE TABLE events(event_timestamp TIMESTAMP, event_type VARCHAR, model_name VARCHAR)" +) +events = [] +models = ["Gemma 3 4B · local", "Llama 3.2 3B · local", "GPT-4o mini · cloud"] +for hour in range(48): + timestamp = datetime(2026, 10, 19) + timedelta(hours=hour) + daytime = (1 + math.sin((hour % 24 - 7) * math.pi / 12)) / 2 + volumes = [ + round(45 + 175 * daytime + 20 * math.sin(hour * 0.7)), + round(30 + 115 * daytime + 12 * math.cos(hour * 0.9)), + round(15 + 55 * daytime + (35 if 31 <= hour <= 37 else 0)), + ] + for model, count in zip(models, volumes, strict=True): + events.extend( + (timestamp + timedelta(seconds=second * 7), "inference", model) + for second in range(count) + ) +connection.executemany("INSERT INTO events VALUES (?, ?, ?)", events) +query = (source / "query.sql").read_text() +cursor = connection.execute(query) +rows = [ + [value.isoformat() if isinstance(value, datetime) else value for value in row] + for row in cursor.fetchall() +] +assert len(rows) == 48 * 3 +assert sum(row[2] for row in rows) == len(events) +fixture = { + "columns": [description[0] for description in cursor.description], + "rows": rows, + "truncated": False, + "elapsed_ms": 0, +} + +(destination / "src/services/demo/screenshot-result.json").write_text( + json.dumps(fixture) +) +shutil.copyfile( + source / "query.sql", destination / "src/services/demo/screenshot-query.sql" +) +shutil.copyfile( + source / "DemoAnalytics.vue", destination / "src/views/DemoAnalytics.vue" +) +print(f"Computed {len(rows)} grouped rows from {len(events)} fictional events.") +print(f"Preview prepared in {destination}") diff --git a/docs/images/sql-preview/query.sql b/docs/images/sql-preview/query.sql new file mode 100644 index 0000000..7a914da --- /dev/null +++ b/docs/images/sql-preview/query.sql @@ -0,0 +1,10 @@ +SELECT + date_trunc('hour', event_timestamp) AS hour, + model_name, + count(*) AS inferences +FROM events +WHERE event_type = 'inference' + AND event_timestamp >= TIMESTAMP '2026-10-19 00:00:00' + AND event_timestamp < TIMESTAMP '2026-10-21 00:00:00' +GROUP BY 1, 2 +ORDER BY 1, 2;