Repository navigation
v0.2.0-alpha.8
Pre-releaseA polish release: load-tested at scale, a structural clean-up of the server, faster GPU time per run, and
fixes from independent reviews. The database upgrades in place (migrations 0011 to 0013 only add indexes and
relax one unique index, so rolling back to the alpha.7 image is safe). Before upgrading, note:
-
Breaking (clients):
GET /v1/runs/{id}/metricsno longer has a Server-Sent Events mode, so an
alpha.7 CLI'sgrad runs logs --followfails against this server; upgrade the CLI. The Go SDK's lists and
Resumeand the Rust SDK's lists andcreatecalls take options structs (details below). -
Breaking (workers):
/completewith a status the job's kind doesn't support answers 422
unsupported_completionfor every kind. -
Building the CLI from source needs Rust 1.88.
-
Helm: the chart validates its values against
values.schema.json(unknown keys fail the install),
workers.authalso takes a list, and API pods drain forapi.shutdownDrainSecondsbefore stopping. -
Server at scale (measured with 1k workspaces, 100k runs, 10M job events, a 1M-record dataset, 200
workers and 5,000 event streams): every open run event stream leaked memory until the API ran out (upstream
@hono/node-serverbug, now 2.1.11); run plans, eval plans and dataset filters no longer load a whole dataset
version (a plan on more than 100k records is estimated from a spread sample and says so); a push, import or
source sync indexes only the new parts instead of the whole dataset, and parts are (de)compressed off the event
loop; idle workers polling a queue they can't take from no longer contend on the claim lock or the database
pool; the waiting-for-compute and job-event retention sweeps keep up with 100k queued runs and thousands of
events a second; each run event is serialized once for all its streams; migration 0011 adds the indexes that
workspace purges andGET /v1/usage?run_id=were missing, and the usage reports skip Postgres JIT. -
SDKs: one name per verb.
sources.delete(Python, TS),Sources.Delete(Go) andsources().delete(Rust)
replaceremove, which stays as a deprecated alias (it shipped in 0.2.0-alpha.7);grad sources deleteis the
CLI verb andremoveits alias. Breaking (Go):Runs.Resume(ctx, id, grad.ResumeOptions{MaxCostUSD: 10})
andrun.Resume(ctx, grad.ResumeOptions{})take an options struct instead of a required cap. Breaking
(Rust):runs().create,evals().create,datasets().scoreandartifacts().create_importtake
&CreateOptions { idempotency_key }instead of a positional key;sources().create_withreads the key from
SourceOptions::idempotency_key, andsources().createno longer takes one. -
SDKs: scores and counts. TypeScript
evals.postScores(id, scores)and GoEvals.PostScorespost scores for
anawaiting_scoreseval, as Python and Rust do; all four send 1,000 per request and returnacceptedsummed
over the requests (Python returned the last request's count, Rust sent everything in one request).runs.counts
(Python, TS),Runs.Counts(Go),runs().counts(Rust) andgrad runs counts [--search]read
GET /v1/runs/counts. The Rust SDK prints a run plan withprintln!("{plan}"), like the other SDKs. -
CLI:
grad secrets get NAMEshows a secret's metadata (never its value);grad artifacts import-status ID
shows an artifact import queued with--no-wait. The Homebrew formula installs the bash, zsh and fish
completions. -
SDKs: safer downloads and event streams. An extraction never replaces the working directory or a
parent of it: Python'sartifacts.download(ref)defaulted topath=".", so the defaultformat="peft"
could not work, and withoverwrite=Trueit deleted the working tree before failing; Rust and
grad artifacts download --output . --forcedid the same. Python's default destination is now
./<name>-<version>(.grad.tar.gzfor a bundle). TypeScript and Go check that an extraction directory
is empty before downloading, not after; they also checkeval_report.jsonagainst
manifest.eval_report_sha256, as Python and Rust do, and TypeScript no longer accepts an unlisted
bundle file named like anObjectproperty (constructor). When a proxy answers the run event stream
with JSON, TypeScript (which reconnected forever) and Go raise anot_event_streamdecode error. -
SDKs: a followed event stream fails fast on a dead server.
events(follow)andwait()in all four SDKs
(andgrad runs events --follow,grad runs wait) give up after 20 dropped or refused reconnects in a row
(Go allowed 10, Rust 8, TypeScript reconnected forever), counted only once the stream has been open: a server
that was never up fails after the usual request retries (about a second) instead of retrying for three minutes. -
CLI: the
vllm servelinegrad artifacts download --outputprints carries--max-lora-rank, the adapter's
rank rounded up to a value vLLM accepts; vLLM's default (16) refuses grad's default rank-32 adapters. -
Run comparison reads.
GET /v1/runs/{id}/metrics?max_points=Nreturns a run's whole curve in one page, thinned
to at most N points spaced evenly back from the newest (eval points thinned separately, so a sparse eval curve
survives) and without the steps a resumed attempt replayed. A 100,000-point run answers in about 300 ms.
GET /v1/runs/counts(countRuns/count_runs/CountRuns) counts the workspace's runs per status, narrowed by
qlike the list; migration0012adds the index it reads (100,000 runs: 14 ms). -
Breaking:
GET /v1/runs/{id}/metricsis JSON pages only. Its Server-Sent Events mode is gone (every SDK and
the CLI already follow metric points onGET /v1/runs/{id}/events); the generated
listRunMetricsStream/ListRunMetricsStream/list_run_metrics_streamare removed. -
Spec: no whole-component nulls. A nullable use of a named schema (
latest_metric,last_sync, a
checkpoint'sformat, ...) marked the component itself nullable, so the typed SDKs read
MetricPoint | nullinside metrics pages and events and an optionalformaton every artifact; the
trainer-callback responses had anallOfwith null that no null value matched. The null now sits at
each nullable field (anyOf: [$ref, null]).MetricsPage.data,MetricEvent.metric,
Artifact.formatandArtifactImport.formatare non-null in all four SDKs (Go drops the pointers,
Rust theOption). -
Evals: a transient failure (storage, the database) while handing a claimed eval to its worker requeues the eval at
once, spending the attempt, as runs and imports already did; before, the eval stayed leased until its lease expired. -
Docs:
spec/openapi.yamldescribes the fields ofRun,PlanRunRequest,Checkpoint,Artifact,Dataset,
EvalRun,PlanEvalRequest,ImportJob,ApiKey,SourceandUsageRecord(descriptions only, no wire
change), so the generated API reference and the SDKs' doc
comments explain them. A problem'stypeURL (https://gradiated.com/problems/<code>) now opens that code's entry
in Errors.scripts/check-docs-snippets.py --api-examplessends
every request body the API reference shows to a live stack (--capturerecords each endpoint's response for it),
and fenced blocks with a title are checked too.grad --helphas examples forruns events,runs resume,
runs promote,eval failures,secrets set,sources addandsources update. -
List filters.
GET /v1/runstakesstatus(comma-separated, e.g.queued,running) andq
(a case-insensitive name substring, or an exact id);GET /v1/evalstakesstatus;
GET /v1/importstakesstatusanddataset;GET /v1/datasetsandGET /v1/artifactstake
q. Filters keep the same newest-first cursor. Every SDK's generated client has them. -
SDKs and CLI: list filters.
runs.list(status=["failed", "cancelled"], search="sft"),
evals.list(status=),imports.list(status=, dataset=),datasets.list(search=)and
artifacts.list(search=)in Python (TS takes the same options object; Rust takesRunFilter,
EvalFilter,ImportFilterandArtifactFilter, anddatasets().list(search, page)). Breaking
(Go):Runs.List,Evals.List,Imports.List,Datasets.ListandArtifacts.Listtake an
options struct (grad.RunListOptions{Status: ..., Search: ...};Artifacts.List(ctx, name)is
nowgrad.ArtifactListOptions{Name: name}). Breaking (Rust): those lists and their
list_alltake the filter. The CLI hasgrad runs list --status failed,cancelled --search sft,
grad eval list --status,grad imports list --status --dataset, and--searchon
grad datasets listandgrad artifacts list. Resolving a run by name (grad runs get NAME,
Rustfind_by_name) asks the server for matching names instead of walking every run. -
SDKs: uploads of any size. The TypeScript SDK sent presigned uploads under the 60 s
per-attempt timeout, so an upload slower than that (a few GB of weights) failed; uploads now have
no per-attempt deadline (anAbortSignalstill cancels them). It also read the whole file into
memory first (Node's fetch buffers a Blob body, even fromopenAsBlob): a 2 GiB upload peaked at
2.1 GiB RSS, now 99 MiB, streamed from disk throughnode:http(s)with its Content-Length. With afetchoption
(a proxy wrapper), the upload goes through that fetch as a stream of the file; before, it sent the text
[object Object]. The Go SDK now retries an upload
(dropped connection, 5xx), rewinding the file each time. -
SDKs: one retry rule everywhere, pinned by
tests/fixtures/wire/retries.json, which every
SDK replays: aRetry-Afterabove 60 s raises the typed error at once in every SDK (Python and
Rust used to sleep 60 s and retry). Python'sretry_afteris on every API error, not only 429.
The Rust SDK closes idle connections after 4 s, below grad-server's keep-alive, as Python does. -
Go:
Evals.ResultsandEvals.Outputs(and on*Eval), as the other SDKs have, and
Download(ctx, dir, grad.Extract())(also onRun.Download) writes the bundle's verified files
into a new directory, as Python, Rust and the CLI do: regular files with safe paths only, each
checked against manifest.json, and nothing left behind on failure. TypeScript has the same as
download(dest, { extract: true })(streamed, no tar dependency). -
TypeScript: a CRLF split across two SSE chunks no longer splits an event.
-
Rust: collect-all helpers where the other SDKs iterate every page:
imports().list_all(),
artifacts().list_all(name),runs().checkpoints_all(id),evals().results_all,
failures_allandoutputs_all(bounded like everylist_all). -
SDK READMEs: one quickstart per SDK (push two records, plan, train
test/tiny-qwen3,
download) that runs ongrad local up --dev-modelsin about 10 s; each SDK's test suite runs it
verbatim (Python, TypeScript and Go live suites; the Rust README is the crate docs, socargo testcompiles it). The Rust SDK has a README. -
grad local upsays the first pull is about 3 GB, not 600 MB. -
grad completion bash|zsh|fish|elvish|powershellprints a shell completion script. -
CLI: every command that shows one thing answers to
get(grad runs get,artifacts get,
eval get,imports get,sources get, besidesinspect/status/show), andgrad sources deleteworks likeremove. -
SDKs: one live stream per run.
metrics(follow=True)(Python, TypeScript, Go) and
grad runs logs --follownow read the metric events of the run's event stream
(GET /v1/runs/{id}/events), the streamwait()already follows, instead of a second SSE
connection to/v1/runs/{id}/metrics. The Rust SDK dropsruns().stream_metricsand
wait_with_metrics: useruns().events(id, true)and matchRunEvent::Metric, or
wait_with_events.