aiinfra-tools 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +268 -0
- package/README.md +27 -3
- package/bin/aiinfra.mjs +5 -2
- package/bin/report.mjs +177 -0
- package/fleetops/README.md +33 -1
- package/fleetops/deploy/shadow-gate/argo-analysistemplate.yaml +34 -0
- package/fleetops/deploy/shadow-gate/argo-rollout-example.yaml +38 -0
- package/fleetops/deploy/shadow-gate/flagger-canary.yaml +34 -0
- package/fleetops/deploy/shadow-gate/judge.yaml +51 -0
- package/fleetops/deploy/shadow-gate/llmd-canary-example.yaml +35 -0
- package/fleetops/deploy/shadow-gate/podmonitor-vllm.yaml +20 -0
- package/fleetops/deploy/shadow-live/README.md +41 -0
- package/fleetops/deploy/shadow-live/kit.yaml +123 -0
- package/fleetops/deploy/shadow-live/load-canary.yaml +26 -0
- package/fleetops/deploy/shadow-live/run.sh +53 -0
- package/fleetops/docs/ADMISSION.md +9 -9
- package/fleetops/docs/FABRIC-STORAGE.md +1 -1
- package/fleetops/docs/SERVING.md +11 -1
- package/fleetops/docs/SHADOW.md +250 -0
- package/fleetops/docs/SIGNALS.md +5 -2
- package/fleetops/docs/WORKLOADS.md +1 -1
- package/fleetops/package.json +7 -4
- package/fleetops/src/adapters/fabric.mjs +19 -7
- package/fleetops/src/adapters/live.mjs +38 -5
- package/fleetops/src/adapters/logs.mjs +10 -7
- package/fleetops/src/adapters/nvsentinel.mjs +95 -0
- package/fleetops/src/adapters/topology.mjs +53 -1
- package/fleetops/src/admission.mjs +26 -18
- package/fleetops/src/api.mjs +2 -1
- package/fleetops/src/bundle.mjs +3 -0
- package/fleetops/src/calibrate.mjs +1 -1
- package/fleetops/src/detect.mjs +1 -1
- package/fleetops/src/export.mjs +5 -1
- package/fleetops/src/goodput.mjs +0 -2
- package/fleetops/src/incidents.mjs +1 -2
- package/fleetops/src/ingest.mjs +10 -3
- package/fleetops/src/inject.mjs +2 -2
- package/fleetops/src/live.mjs +2 -1
- package/fleetops/src/llmd.mjs +7 -3
- package/fleetops/src/optimize.mjs +1 -1
- package/fleetops/src/power.mjs +7 -7
- package/fleetops/src/procure.mjs +67 -0
- package/fleetops/src/rca.mjs +1 -1
- package/fleetops/src/rollout.mjs +1 -1
- package/fleetops/src/schema.mjs +3 -2
- package/fleetops/src/security.mjs +1 -1
- package/fleetops/src/serving.mjs +32 -10
- package/fleetops/src/shadow-canary.mjs +74 -0
- package/fleetops/src/shadow-gate.mjs +49 -0
- package/fleetops/src/shadow-prom.mjs +205 -0
- package/fleetops/src/shadow-replay.mjs +147 -0
- package/fleetops/src/shadow.mjs +291 -0
- package/fleetops/src/stats.mjs +14 -0
- package/fleetops/src/traces.mjs +0 -5
- package/fleetops/tests/fixtures/real/README.md +5 -0
- package/fleetops/tools/admit-node.sh +51 -16
- package/fleetops/tools/amd-admit.py +111 -0
- package/fleetops/tools/cmd/calibrate.mjs +61 -0
- package/fleetops/tools/cmd/capacity.mjs +116 -0
- package/fleetops/tools/cmd/common.mjs +32 -0
- package/fleetops/tools/cmd/data.mjs +343 -0
- package/fleetops/tools/cmd/help.mjs +243 -0
- package/fleetops/tools/cmd/incidents.mjs +216 -0
- package/fleetops/tools/cmd/rollout.mjs +122 -0
- package/fleetops/tools/cmd/server.mjs +122 -0
- package/fleetops/tools/cmd/serving.mjs +95 -0
- package/fleetops/tools/cmd/shadow.mjs +204 -0
- package/fleetops/tools/cmd/training.mjs +79 -0
- package/fleetops/tools/collect.sh +6 -1
- package/fleetops/tools/fleetops.mjs +18 -1308
- package/fleetops/tools/loop-demo.mjs +1 -1
- package/fleetops/tools/workload-profile.mjs +0 -1
- package/fleetscope/README.md +5 -1
- package/fleetscope/build.mjs +4 -0
- package/fleetscope/dist/index.html +1013 -28
- package/fleetscope/docs/AGENTIC.md +89 -0
- package/fleetscope/docs/PLANNING.md +4 -2
- package/fleetscope/docs/VALIDATION-AGENTIC.md +37 -0
- package/fleetscope/package.json +4 -3
- package/fleetscope/src/agentic.js +288 -0
- package/fleetscope/src/ask.js +0 -1
- package/fleetscope/src/cluster-ui.js +1 -0
- package/fleetscope/src/engine.js +29 -13
- package/fleetscope/src/index.src.html +15 -5
- package/fleetscope/src/inference-ui.js +1 -0
- package/fleetscope/src/ingest.js +89 -3
- package/fleetscope/src/optimize.js +11 -5
- package/fleetscope/src/plan.js +1 -1
- package/fleetscope/src/training-ui.js +1 -0
- package/fleetscope/tools/agentic.mjs +148 -0
- package/fleetscope/tools/tracelab-data.mjs +27 -0
- package/gpu-health/README.md +13 -2
- package/gpu-health/docs/CONFIG.md +29 -1
- package/gpu-health/package.json +7 -4
- package/gpu-health/src/actions.mjs +16 -3
- package/gpu-health/src/analyze.mjs +3 -0
- package/gpu-health/src/config.mjs +3 -0
- package/gpu-health/src/executors.mjs +9 -4
- package/gpu-health/src/health.mjs +1 -1
- package/gpu-health/src/ingest.mjs +27 -3
- package/gpu-health/src/platforms.mjs +109 -0
- package/gpu-health/src/vendors.mjs +12 -5
- package/gpu-health/tools/gpu-health.mjs +6 -4
- package/gpu-ledger/README.md +3 -1
- package/gpu-ledger/package.json +12 -4
- package/gpu-ledger/src/adapters.mjs +3 -2
- package/gpu-ledger/src/cloud.mjs +104 -0
- package/gpu-ledger/src/core.mjs +12 -10
- package/gpu-ledger/tools/ledger.mjs +8 -2
- package/harness-ledger/README.md +152 -0
- package/harness-ledger/docs/FORMATS.md +114 -0
- package/harness-ledger/docs/METHOD.md +133 -0
- package/harness-ledger/docs/VALIDATION-ECONOMICS.md +59 -0
- package/harness-ledger/docs/VALIDATION-SWEBENCH.md +26 -0
- package/harness-ledger/docs/VALIDATION-TRACELAB.md +56 -0
- package/harness-ledger/package.json +19 -0
- package/harness-ledger/src/demo.mjs +115 -0
- package/harness-ledger/src/economics.mjs +184 -0
- package/harness-ledger/src/gpu.mjs +80 -0
- package/harness-ledger/src/html.mjs +63 -0
- package/harness-ledger/src/importers.mjs +247 -0
- package/harness-ledger/src/ledger.mjs +128 -0
- package/harness-ledger/src/opencost.mjs +55 -0
- package/harness-ledger/src/outcomes.mjs +67 -0
- package/harness-ledger/src/prices.mjs +75 -0
- package/harness-ledger/src/record.mjs +52 -0
- package/harness-ledger/src/waste.mjs +136 -0
- package/harness-ledger/tools/harness-ledger.mjs +199 -0
- package/harness-ledger/tools/validate-economics.mjs +69 -0
- package/harness-ledger/tools/validate-swebench.mjs +57 -0
- package/harness-ledger/tools/validate-tracelab.mjs +74 -0
- package/hybrid-tracing/package.json +4 -3
- package/hybrid-tracing/tools/fix-skew.mjs +1 -1
- package/inference-sizer/README.md +5 -1
- package/inference-sizer/build.mjs +1 -0
- package/inference-sizer/dist/index.html +299 -31
- package/inference-sizer/docs/ACCELERATORS.md +62 -0
- package/inference-sizer/docs/CATALOG.md +71 -0
- package/inference-sizer/docs/METHOD.md +1 -1
- package/inference-sizer/docs/VALIDATION-INFERENCEX.md +37 -0
- package/inference-sizer/package.json +4 -3
- package/inference-sizer/src/accelerators.js +194 -0
- package/inference-sizer/src/catalog.js +55 -22
- package/inference-sizer/src/fit-ui.js +1 -1
- package/inference-sizer/src/index.src.html +3 -0
- package/inference-sizer/src/model.js +45 -7
- package/inference-sizer/src/ui.js +1 -1
- package/inference-sizer/tools/validate-agentx.mjs +116 -0
- package/inference-sizer/tools/validate-inferencex.mjs +132 -0
- package/mcp/README.md +6 -1
- package/mcp/server.mjs +34 -0
- package/package.json +10 -6
- package/schemas/README.md +3 -0
- package/schemas/aiinfra.report.schema.json +474 -0
- package/schemas/commands.mjs +14 -0
- package/schemas/fleetops.shadow.canary.schema.json +96 -0
- package/schemas/fleetops.shadow.compare.schema.json +266 -0
- package/schemas/fleetops.shadow.prom.schema.json +354 -0
- package/schemas/harness-ledger.economics.schema.json +567 -0
- package/schemas/sizer.list.schema.json +15 -2
|
@@ -58,7 +58,7 @@ function steps1to4(dir) {
|
|
|
58
58
|
head(3, 'Simulate', 'what each change should give back, before anyone makes it');
|
|
59
59
|
out.simulate = T.recommendations.map(r => ({ id: r.id, title: r.title, gpuHoursPerWeek: r.impact.gpuHoursPerWeek, basis: r.impact.basis, confidence: r.confidence }));
|
|
60
60
|
for (const r of out.simulate) say(` → ${r.title}: up to ${n0(r.gpuHoursPerWeek)} GPU-hours a week (${r.basis}).`);
|
|
61
|
-
|
|
61
|
+
run('optimize candidates', ['optimize', 'candidates', '--from', String(FROM), '--to', String(TO), '--store', S, '--out', path.join(dir, 'candidates.json')]);
|
|
62
62
|
const P = run('optimize plan', ['optimize', 'plan', '--candidates', path.join(dir, 'candidates.json'), '--out', path.join(dir, 'plan.json'), '--store', S]);
|
|
63
63
|
const plan = P.plan || JSON.parse(fs.readFileSync(path.join(dir, 'plan.json'), 'utf8'));
|
|
64
64
|
out.plan = { id: plan.id, weekly: plan.totalWeekly, stages: plan.stages.map(s => s.title) };
|
|
@@ -9,7 +9,6 @@ const require=createRequire(import.meta.url);
|
|
|
9
9
|
const {parseTrace}=require("../../fleetscope/src/ingest.js");
|
|
10
10
|
const args=process.argv.slice(2), cmd=args[0]||"help";
|
|
11
11
|
function opt(name,fallback){const i=args.indexOf("--"+name);return i<0?fallback:args[i+1];}
|
|
12
|
-
function flag(name){return args.includes("--"+name);}
|
|
13
12
|
function save(out,data){if(!out)throw new Error("--out is required");fs.mkdirSync(path.dirname(path.resolve(out)),{recursive:true});fs.writeFileSync(out,data);}
|
|
14
13
|
function readInput(file) {
|
|
15
14
|
// Offset limit permits normal trace windows beyond FleetScope's browser truncation.
|
package/fleetscope/README.md
CHANGED
|
@@ -58,6 +58,10 @@ Upload a log to the Trace replay node: vLLM OpenTelemetry spans, gateway JSON lo
|
|
|
58
58
|
|
|
59
59
|

|
|
60
60
|
|
|
61
|
+
### Agentic workloads: profiles from real agent sessions
|
|
62
|
+
|
|
63
|
+
`tools/agentic.mjs` fits a profile of how agent sessions behave (context growth, cache reuse, tool-loop pace, human pauses, compactions, subagents) from a real trace, generates sessions from it at any load, and sizes GPUs counting both compute and the KV cache that idle sessions hold between turns. On the public TraceLab trace (8,058 Claude Code and Codex sessions), a profile fitted on 70% of sessions matches replaying the other 30% within 1–8% on cache hit, call rate and prefill and output tokens/s; sizing the same calls from mean ISL/OSL without cache reuse asks for 440 GPUs where 40 do. `size --kv-offload` adds host-memory KV offload (the GPU count with the cold part of the working set in host memory, and the PCIe reload time it costs), and every size reports output tokens/s per megawatt. See [docs/AGENTIC.md](docs/AGENTIC.md) and [docs/VALIDATION-AGENTIC.md](docs/VALIDATION-AGENTIC.md).
|
|
64
|
+
|
|
61
65
|
### Closed-loop replay of recorded sessions
|
|
62
66
|
|
|
63
67
|
A recorded agent log (150 sessions, 1,516 turns) replayed as sessions: each turn waits for the previous answer and keeps the recorded think time between them, so a slower fleet sees less traffic instead of an impossible backlog. On 4 on-prem H100s, turns run a median 16 s behind the log, and simulated TTFT p99 is 9.6 s against 1.2 s recorded: this fleet is far slower than the one that produced the log. Replaying the same log by timestamps gives a p99 of 34 s. See [docs/TRACES.md](docs/TRACES.md#closed-loop-replay).
|
|
@@ -210,7 +214,7 @@ Coding-agent traffic. Each candidate model and reasoning level is right-sized to
|
|
|
210
214
|
|
|
211
215
|
```bash
|
|
212
216
|
cd fleetscope
|
|
213
|
-
npm test # engine tests (Node
|
|
217
|
+
npm test # engine tests (Node 22+, no dependencies)
|
|
214
218
|
npm run build # inline src/ into dist/index.html
|
|
215
219
|
```
|
|
216
220
|
|
package/fleetscope/build.mjs
CHANGED
|
@@ -9,6 +9,10 @@ const read = p => readFileSync(join(here, p), 'utf8');
|
|
|
9
9
|
|
|
10
10
|
const page = read('src/index.src.html');
|
|
11
11
|
const inlined = {
|
|
12
|
+
'/*ACCELERATORS*/': readFileSync(join(here, '../inference-sizer/src/accelerators.js'), 'utf8'),
|
|
13
|
+
// the sizer's catalog and model: FleetScope's model list comes from the catalog, its KV per token from the model
|
|
14
|
+
'/*SIZERCATALOG*/': readFileSync(join(here, '../inference-sizer/src/catalog.js'), 'utf8'),
|
|
15
|
+
'/*SIZERMODEL*/': readFileSync(join(here, '../inference-sizer/src/model.js'), 'utf8'),
|
|
12
16
|
'/*ENGINE*/': read('src/engine.js'),
|
|
13
17
|
'/*TEMPLATES*/': read('src/templates.js'),
|
|
14
18
|
'/*INGEST*/': read('src/ingest.js'),
|