feat(timemachine): Model Time Machine — counterfactual replay of your real workload#270
Closed
gizmax wants to merge 6 commits into
Closed
feat(timemachine): Model Time Machine — counterfactual replay of your real workload#270gizmax wants to merge 6 commits into
gizmax wants to merge 6 commits into
Conversation
…workload
Selects recorded run cassettes (completed runs with persisted prompts/outputs/
costs/latencies), prices them against any target model's pricing table (free
dry-run), or live-replays every LLM step on the target model with an LLM-judge
quality score - gated behind an explicit budget cap with pre-flight refusal.
Reports persist as JSON artifacts under {data_dir}/timemachine/.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
POST /api/timemachine (202 + job_id; validates model, enforces budget_usd for
live replays and refuses when the pre-flight estimate exceeds it),
GET /api/timemachine/{job_id} (status + report), GET /api/timemachine (recent).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sandcastle timemachine --model nim/llama-3.1-70b --since 30d [--live --budget 5.0] prints per-workflow cost/quality/latency deltas and the headline verdict. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…PI lifecycle Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…orkload Route /time-machine + sidebar entry. Dry-run by default (free pricing-table projection), live replay toggle with budget cap, polling job flow, headline verdict, per-workflow quality/cost/latency delta table, confident empty state, and mock-mode demo data so the page works offline. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…orkload Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
Shipped in v0.40.0 (release integration merged to main). Closing — superseded by the 0.40.0 release. |
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.
"New model dropped? Replay last month's real workload against it and decide on data, not Twitter benchmarks."
engine/timemachine.py: selects completed runs/steps by workflow + date range, re-executes recorded prompts against a target model, scores old vs new output with an LLM judge, aggregates per-workflow and overall quality ± / cost ± / latency ±, extrapolates monthly savings → verdict: "Switching to X saves $Y/mo at ±Z% quality"budget_usdwith pre-flight estimate refusal and mid-run truncation at cap (judge cost counted too)POST /api/timemachine(async job),GET /api/timemachine/{job_id},GET /api/timemachine; reports persisted as JSON artifacts underdata_dir/timemachine/sandcastle timemachine --model nim/llama-3.1-70b --since 30d [--live --budget 5.0]/time-machinepage — model + range picker, verdict hero, summary cards, per-workflow table, report history; demo data in mock modeLocal models (NIM/Ollama/oMLX) replay at $0 — the direct sales pitch for on-box inference.
Tests: 27 new pytest (dry-run math vs hand-computed fixture, budget contract, live aggregation, API lifecycle) + 5 vitest; full dashboard suite 810/810; lint zero new; build green; ruff clean.
Stacked on #255 (gui-experiment).