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
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
|:---:|:---:|:---:|
| <a href="docs/images/demo-model-performance.jpg"><img src="docs/images/demo-model-performance.jpg" alt="Model health, latency, time to first token, and throughput" width="180"></a> | <a href="docs/images/demo-events.jpg"><img src="docs/images/demo-events.jpg" alt="Inference and error events with model and device metadata" width="180"></a> | <a href="docs/images/demo-hardware.jpg"><img src="docs/images/demo-hardware.jpg" alt="Thermal state, accelerator usage, and CPU throttling" width="180"></a> |
| <a href="docs/images/demo-model-performance.jpg"><img src="docs/images/demo-model-performance.jpg" alt="Model health, latency, time to first token, and throughput" width="180"></a> | <a href="docs/images/demo-trace.jpg"><img src="docs/images/demo-trace.jpg" alt="Named workflow step and inference timing in a trace waterfall" width="180"></a> | <a href="docs/images/demo-sql.jpg"><img src="docs/images/demo-sql.jpg" alt="SQL query with stacked hourly inference volumes across local and cloud models" width="180"></a> |

*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).*

<details>
<summary>More screenshots: events and hardware</summary>

| Events | Hardware |
|:---:|:---:|
| <a href="docs/images/demo-events.jpg"><img src="docs/images/demo-events.jpg" alt="Inference and error events with model and device metadata" width="180"></a> | <a href="docs/images/demo-hardware.jpg"><img src="docs/images/demo-hardware.jpg" alt="Thermal state, accelerator usage, and CPU throttling" width="180"></a> |

</details>

## Install

```bash
Expand Down
11 changes: 11 additions & 0 deletions docs/images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Binary file added docs/images/demo-sql.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/demo-trace.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions docs/images/sql-preview/DemoAnalytics.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<template>
<div class="analytics data-view">
<div class="query-header">
<ButtonGroup>
<Button label="Builder" severity="secondary" />
<Button label="SQL" />
</ButtonGroup>
<strong>Inference volume · local and cloud models</strong>
<span class="sample-label">Sample data</span>
</div>
<div class="demo-notice" role="note">
Illustrative sample data · 48 hours · 3 models. Query results computed locally with DuckDB.
This screenshot preview is not a production deployment.
</div>
<SqlExplorer :initial-sql="query" demo-preview />
<QueryResult compact :result="result" :loading="false" :error="null" :initial-view="{
vizType: 'bar', stacked: true, xCol: 'hour', yCol: 'inferences', seriesCol: 'model_name',
display: {}, statValueColumn: null, statReducer: 'last',
}" />
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, nextTick } from 'vue'
import Button from 'primevue/button'
import ButtonGroup from 'primevue/buttongroup'
import SqlExplorer from '@/components/SqlExplorer.vue'
import QueryResult from '@/components/QueryResult.vue'
import type { QueryResultData } from '@/services/analyticsService'
import query from '@/services/demo/screenshot-query.sql?raw'
import fixture from '@/services/demo/screenshot-result.json'
const result = ref<QueryResultData | null>(null)
onMounted(async () => { await nextTick(); result.value = fixture })
</script>
<style scoped>
.analytics { display: flex; flex-direction: column; gap: 1rem; }
.query-header { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.sample-label { color: var(--text-color-secondary); margin-left: auto; }
.demo-notice { padding: .75rem 1rem; border: 1px solid var(--surface-border); border-radius: 8px;
color: var(--text-color-secondary); line-height: 1.5; }
</style>
27 changes: 27 additions & 0 deletions docs/images/sql-preview/README.md
Original file line number Diff line number Diff line change
@@ -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.
76 changes: 76 additions & 0 deletions docs/images/sql-preview/prepare.py
Original file line number Diff line number Diff line change
@@ -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}")
10 changes: 10 additions & 0 deletions docs/images/sql-preview/query.sql
Original file line number Diff line number Diff line change
@@ -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;