Operate the platform
Status. Written from this build's code and tests on 2026-11-16. The in-cluster flush command below follows from the service's origin rule and has not been run against a live deployment for this page.
This page is for the operator of a deployment, not for a customer. Operating is three steps, always in this order: observe what is running, preview what the queue would stand up and what it would cost, then act by flushing the queue under a budget. The first two change nothing and can be repeated freely. Only the third can lead to GPUs being rented.
export WEIGHTS_PUBLIC_URL=https://weights.fyi/run
export WEIGHTS_OPERATOR_TOKEN_FILE=~/.weights/operator.token # a file holding an operator API token
weights status # 1. observe
weights plan --budget-usd 100 # 2. preview
weights flush --budget-usd 100 --operation-key my-run # 3. actEvery command has --help, and every operator call is described, with who may call it and from where, at https://weights.fyi/run/v1/operator/openapi.json.
WEIGHTS_OPERATOR_TOKEN=$(cat "$WEIGHTS_OPERATOR_TOKEN_FILE")
curl -sS https://weights.fyi/run/v1/operator/openapi.json \
-H "Authorization: Bearer $WEIGHTS_OPERATOR_TOKEN"The words
| Word | Meaning |
|---|---|
| ComputePlan | A customer's queued work: stages with dependencies, a time window and a budget. It waits in the queue at no cost until a model that serves it is running. |
| Cohort | One model, with every plan that asks for it. |
| Wave | The cohorts one node serves at the same time. A node moves from one wave to the next by swapping models, without a new boot. |
| Pass 1, Pass 2 | Pass 1 is qualification and benchmark work. Pass 2 is everything else. |
| Flush | Re-evaluate the queue and record capacity demand. A flush rents nothing itself. |
| Fleet | The controller that reads the demand, rents GPU nodes within its budget and stops them when the work is done. |
| Flush budget | The operator's ceiling on what the fleet commits. |
| Plan cap | The active plans' own budgets, summed: what customers' plans may spend. A different limit. |
| G | How many GPUs the fleet holds. G = 0 means nothing is rented. |
1. Observe: weights status
weights status prints Snapshot v1, the one read-only document of the live estate. The same document is the page /operator/now and the JSON at https://weights.fyi/run/v1/operator/snapshot. --json prints it whole; --watch repeats it every period.
| Line | What it tells you |
|---|---|
BOTTLENECK | The one thing holding work back now, with its evidence. |
SPEND | Burn of the nodes still running, what the active plans have settled and reserved, the plan cap, and the runway on what is left of it. |
FLUSH BUDGET | The ceiling in force with its generation, lifted, or none set. |
GPUS | One row per engine: state or boot step, load, KV cache, running and waiting requests. |
WORK, QUEUE | Active plans, tasks, useful output, the ready queue and the share of calls answered 429, 503 and 402. |
A value marked * is stale, n/s is not supported by its source, and - was not measured. Nothing unmeasured is ever shown as zero.
2. Preview: two dry runs that answer different questions
| The customer's preflight | The operator's plan | |
|---|---|---|
| Call | POST /v1/compute/plans/dry-run | weights plan --budget-usd CAP |
| Scope | One ComputePlan, before it is submitted | The whole queue of submitted plans |
| Answers | Would this plan be admitted: its rules, the tenancy grant, each model's pinned release, each chat request against the model's context window | What the queue would stand up: the hardware offering chosen, the waves, the schedule, its duration and its cost against the cap |
| Token | submit | An operator's, read |
| Writes | Nothing | Nothing. The cap is not saved |
Read the plan's last block first. Work not scheduled by this plan lists what the plan leaves out and why, and it never cancels anything.
3. Act: weights flush and its budget
weights flush --budget-usd CAP re-evaluates the queue, records capacity demand and saves CAP as the flush budget. From then on the fleet commits no more than that, whatever later flushes without a budget do, until a flush states another amount or lifts it with --clear-budget. The budget is fleet-wide, even when the flush selected one account or a few plans.
| Receipt field | Meaning |
|---|---|
budget_enforced: true | This flush saved the budget and it is the one in force. false on a dry run, which saves nothing. |
budget_generation | The decision's number. Every budget or lift is the next generation; the highest is in force. |
active_flush_budget | The decision in force now, on every flush answer and preview. Absent while no budget was ever set. |
409 compute_plan_conflict | The --operation-key was already used with another budget decision. Nothing was written. |
The floor. The fleet rents a node only when what is left of the budget pays for one cold boot (create, load the weights, start the engines) plus a first stretch of useful work and the stop. Below that it rents nothing and says how many minutes were funded and how many are required. A budget that is too small buys no partial run.
Where each command works.
| Command | Call | Token | From |
|---|---|---|---|
weights status | GET /v1/operator/snapshot | read, or the read-only snapshot token | Anywhere |
weights plan | GET /v1/operator/compute/plan | read | Anywhere |
weights flush --dry-run | GET /v1/operator/compute/flush | read | Anywhere |
weights flush | POST /v1/operator/compute/flush | manage | The operator mesh, or inside the cluster. 404 anywhere else |
The flush is a write, so the public address answers it 404 whatever the token. Run it on a mesh host, or inside the cluster:
kubectl -n <namespace> exec -i deploy/weights-api -- \
env WEIGHTS_OPERATOR_TOKEN_FILE=/dev/stdin \
python -m weights flush --url http://127.0.0.1:8888/run \
--budget-usd 100 --operation-key my-run < "$WEIGHTS_OPERATOR_TOKEN_FILE"The token is read from standard input, so it is never an argument. weights flush-queue is the same flush run directly on the database, with no budget and no dry run: prefer weights flush.
4. Queue everything, scope the active fleet
Submitting work and serving it are separate decisions. Every cohort can sit in the queue at G = 0; a run then serves some of them.
| What | Where it is set | What it decides |
|---|---|---|
| The queue | Every submitted ComputePlan | What work exists. Scoping a run never edits or removes a plan. |
| The plan's active cohorts | ACTIVE_COHORTS in weights.capacity.terraform_plan | Which models weights plan schedules. Work for any other model is listed as outside this run's active cohorts (remains queued). |
| The fleet's published pools | canonical_platform_pools in the fleet controller's config | Which models a rented node may serve. With restrict_demands_to_published_pools the fleet also ignores demand for any other model. |
Work outside the scope is queued, not cancelled: it runs when a later fleet serves its model. Cancelled is a final state that only an explicit cancel request sets. A whole-queue flush re-evaluates every plan, whichever model it names; --plan-prefix or --plan-ids flushes a selection.
5. Two passes at once, and healthy 429
Pass 1 is budgeted first: its cost on every wave is taken out of the cap before any Pass 2 work is funded. It does not run first. On each wave both passes run side by side, and the node then swaps once to the next wave.
| Tier | Fair-share weight | Used by |
|---|---|---|
priority | 4 | Pass 1 |
interactive | 3 | Interactive sessions |
standard | 2 | Pass 2 |
flex, batch, scavenger, piggyback | 1 | Standing work |
Pass 2 takes the slots Pass 1 leaves. When a GPU is full, one model turn is answered 429 with Retry-After (campaign_concurrency_limited); the client retries that turn and the campaign goes on. The scheduler aims to hold this pushback between 5% and 15% of turns, so a steady share in that band means the GPU is full and well used. 502, 503 and other 5xx are faults and belong to no target. See Rate limits.
6. From an AWOW campaign to a lease
| AWOW | Weights | In the snapshot |
|---|---|---|
| A campaign submitted for one cohort | One ComputePlan, which carries the campaign's name, run id and workspace in its metadata | joins.rows[].awow and .weights.plan_id |
| The campaign's steps | The plan's stages, each waiting for the stages it needs | joins.rows[].weights.stages[] |
| One agent's model session | A seat: a time-limited reservation of one model session for a stage | reserved_seats |
A stage lease: the stage is placed on one GPU node (leased_to_node) | gpu.nodes[].reserved.leased_stages | |
| The agent's turns | Calls decoding on an engine now | decoding_now |
| Worker and sandbox pods | Matched by plan id, run id, campaign or job id | joins.rows[].grid |
Reserved seats and decoding_now are kept apart on purpose: a seat is held while an agent thinks or runs a tool, and only a turn in flight is decoding.