End-to-end demo of kt-masterlog and kt-masterviz working together — installed from PyPI, not from source. This repo's whole point is to validate that the published artifacts work and to give a try-before-you-buy walkthrough for the workflow.
- A small workflow demo that runs a 3-trial × 15-epoch Bayesian sweep over a synthetic classification dataset — about 30–60 seconds on CPU.
- A live Streamlit dashboard that auto-discovers the run via the registry and updates as trials complete.
- A 10-second synthetic smoke test that runs in CI daily to catch breakage from upstream dependency upgrades or yanked releases.
The dataset is intentionally abstract (sklearn.datasets.make_classification). This repo demonstrates how kt-masterlog and kt-masterviz fit together, not how to model any specific problem.
git clone https://github.com/techspeque/kt-masterdemo.git
cd kt-masterdemo
uv syncThat pulls kt-masterlog and kt-masterviz from PyPI into a project-local .venv/.
Terminal 1 — start the tuner:
bash scripts/run.sh
# or directly:
uv run python examples/sweep_demo.pyTerminal 2 — open the dashboard against the live run:
uv run kt-masterviz --latestOpen http://localhost:8501. The dashboard:
- Shows the trial summary sorted by
val_accuracy(the configured objective) - Plots training curves per trial, switchable across
loss,val_loss,accuracy,val_accuracy - Auto-refreshes every 5 s (configurable in the sidebar) so new trials show up live
When the tuner finishes, you'll see all 3 trials in the table and curves. The "Switch run" button in the sidebar lets you flip to other runs you've executed previously.
uv run kt-masterviz --list # tabular listing of every registered run
uv run kt-masterviz # in-dashboard picker over all registered runs
uv run kt-masterviz /path/to/master_log.csv # explicit CSV path (skip the registry)examples/sweep_demo.py builds a small MLP and exposes five hyperparameters:
| Hyperparameter | Values | Why |
|---|---|---|
units_1 |
32, 64, 128 | First hidden layer width |
units_2 |
16, 32, 64 | Second hidden layer width |
dropout |
0.0 – 0.4 step 0.1 | Regularization sweep |
lr |
1e-2, 1e-3, 3e-4 | Learning rate; meaningful across both optimizers |
optimizer |
adam, sgd |
Two qualitatively different optimizers; shows categorical tuning |
The data comes from sklearn.datasets.make_classification with a fixed random_state, so reruns are deterministic. The model deliberately stays simple — its job is to produce interesting-looking training curves so the dashboard has something to render, not to demonstrate a recommended architecture.
- Not a published package.
pyproject.tomldeclares it but it has no build backend; uv just uses it for dependency management. - Not a fork of either kt-masterlog or kt-masterviz. The published artifacts come straight from PyPI; this repo never imports source.
- Not a model recommendation. The hyperparameter ranges and architecture in
sweep_demo.pyare illustrative. Tune your own models with your own ranges. - Not a test suite for either package. Each upstream repo has its own. This is a consumer-side smoke check.
.github/workflows/smoke.yml runs examples/synthetic_smoke.py four ways:
- On every push to
main - On every PR
- Daily at 08:00 UTC via cron
- Manually from the Actions tab
The smoke test:
- Installs
kt-masterlog+kt-mastervizfrom PyPI viauv sync - Runs a 2-trial / 1-epoch synthetic search through
optimize() - Verifies the master CSV was written
- Verifies the registry manifest was created and marked
completed - Verifies
kt-masterviz --listfinds the run
The cron run is the most valuable trigger — it catches the case where a transitive dependency change breaks the installed packages even though the kt-masterlog/kt-masterviz code hasn't changed.
- Python 3.12
uv(auto-installs Python and deps)
No external dataset download — everything is generated on the fly.
The GIF embedded above is committed to the repo. If the kt-masterviz UI changes meaningfully and the recording goes stale, regenerate it:
bash scripts/record_demo.shThis script (~25 s end-to-end):
- Installs the dev group (
playwright,pillow) into the venv - Installs Chromium for headless capture
- Spawns the dashboard against a synthetic CSV
- Writes realistic trial rows to that CSV on a 0.4 s schedule in the background
- Captures 22 s of dashboard frames at 4 fps via Playwright
- Stitches frames into
assets/demo.gifvia Pillow
Output is deterministic — same trial values every time — so diffs in the committed GIF reflect real UI changes rather than ML stochasticity.
MIT.
