Skip to content

v0.2.0-alpha.8

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 28 Nov 17:44
· 290 commits to main since this release

A 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}/metrics no longer has a Server-Sent Events mode, so an
    alpha.7 CLI's grad runs logs --follow fails against this server; upgrade the CLI. The Go SDK's lists and
    Resume and the Rust SDK's lists and create calls take options structs (details below).

  • Breaking (workers): /complete with a status the job's kind doesn't support answers 422
    unsupported_completion for 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.auth also takes a list, and API pods drain for api.shutdownDrainSeconds before 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-server bug, 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 and GET /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) and sources().delete (Rust)
    replace remove, which stays as a deprecated alias (it shipped in 0.2.0-alpha.7); grad sources delete is the
    CLI verb and remove its alias. Breaking (Go): Runs.Resume(ctx, id, grad.ResumeOptions{MaxCostUSD: 10})
    and run.Resume(ctx, grad.ResumeOptions{}) take an options struct instead of a required cap. Breaking
    (Rust):
    runs().create, evals().create, datasets().score and artifacts().create_import take
    &CreateOptions { idempotency_key } instead of a positional key; sources().create_with reads the key from
    SourceOptions::idempotency_key, and sources().create no longer takes one.

  • SDKs: scores and counts. TypeScript evals.postScores(id, scores) and Go Evals.PostScores post scores for
    an awaiting_scores eval, as Python and Rust do; all four send 1,000 per request and return accepted summed
    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) and grad runs counts [--search] read
    GET /v1/runs/counts. The Rust SDK prints a run plan with println!("{plan}"), like the other SDKs.

  • CLI: grad secrets get NAME shows 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's artifacts.download(ref) defaulted to path=".", so the default format="peft"
    could not work, and with overwrite=True it deleted the working tree before failing; Rust and
    grad artifacts download --output . --force did the same. Python's default destination is now
    ./<name>-<version> (.grad.tar.gz for a bundle). TypeScript and Go check that an extraction directory
    is empty before downloading, not after; they also check eval_report.json against
    manifest.eval_report_sha256, as Python and Rust do, and TypeScript no longer accepts an unlisted
    bundle file named like an Object property (constructor). When a proxy answers the run event stream
    with JSON, TypeScript (which reconnected forever) and Go raise a not_event_stream decode error.

  • SDKs: a followed event stream fails fast on a dead server. events(follow) and wait() in all four SDKs
    (and grad 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 serve line grad artifacts download --output prints 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=N returns 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
    q like the list; migration 0012 adds the index it reads (100,000 runs: 14 ms).

  • Breaking: GET /v1/runs/{id}/metrics is JSON pages only. Its Server-Sent Events mode is gone (every SDK and
    the CLI already follow metric points on GET /v1/runs/{id}/events); the generated
    listRunMetricsStream / ListRunMetricsStream / list_run_metrics_stream are removed.

  • Spec: no whole-component nulls. A nullable use of a named schema (latest_metric, last_sync, a
    checkpoint's format, ...) marked the component itself nullable, so the typed SDKs read
    MetricPoint | null inside metrics pages and events and an optional format on every artifact; the
    trainer-callback responses had an allOf with null that no null value matched. The null now sits at
    each nullable field (anyOf: [$ref, null]). MetricsPage.data, MetricEvent.metric,
    Artifact.format and ArtifactImport.format are non-null in all four SDKs (Go drops the pointers,
    Rust the Option).

  • 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.yaml describes the fields of Run, PlanRunRequest, Checkpoint, Artifact, Dataset,
    EvalRun, PlanEvalRequest, ImportJob, ApiKey, Source and UsageRecord (descriptions only, no wire
    change), so the generated API reference and the SDKs' doc
    comments explain them. A problem's type URL (https://gradiated.com/problems/<code>) now opens that code's entry
    in Errors. scripts/check-docs-snippets.py --api-examples sends
    every request body the API reference shows to a live stack (--capture records each endpoint's response for it),
    and fenced blocks with a title are checked too. grad --help has examples for runs events, runs resume,
    runs promote, eval failures, secrets set, sources add and sources update.

  • List filters. GET /v1/runs takes status (comma-separated, e.g. queued,running) and q
    (a case-insensitive name substring, or an exact id); GET /v1/evals takes status;
    GET /v1/imports takes status and dataset; GET /v1/datasets and GET /v1/artifacts take
    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 takes RunFilter,
    EvalFilter, ImportFilter and ArtifactFilter, and datasets().list(search, page)). Breaking
    (Go):
    Runs.List, Evals.List, Imports.List, Datasets.List and Artifacts.List take an
    options struct (grad.RunListOptions{Status: ..., Search: ...}; Artifacts.List(ctx, name) is
    now grad.ArtifactListOptions{Name: name}). Breaking (Rust): those lists and their
    list_all take the filter. The CLI has grad runs list --status failed,cancelled --search sft,
    grad eval list --status, grad imports list --status --dataset, and --search on
    grad datasets list and grad artifacts list. Resolving a run by name (grad runs get NAME,
    Rust find_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 (an AbortSignal still cancels them). It also read the whole file into
    memory first (Node's fetch buffers a Blob body, even from openAsBlob): a 2 GiB upload peaked at
    2.1 GiB RSS, now 99 MiB, streamed from disk through node:http(s) with its Content-Length. With a fetch option
    (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: a Retry-After above 60 s raises the typed error at once in every SDK (Python and
    Rust used to sleep 60 s and retry). Python's retry_after is 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.Results and Evals.Outputs (and on *Eval), as the other SDKs have, and
    Download(ctx, dir, grad.Extract()) (also on Run.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_all and outputs_all (bounded like every list_all).

  • SDK READMEs: one quickstart per SDK (push two records, plan, train test/tiny-qwen3,
    download) that runs on grad local up --dev-models in about 10 s; each SDK's test suite runs it
    verbatim (Python, TypeScript and Go live suites; the Rust README is the crate docs, so cargo test compiles it). The Rust SDK has a README.

  • grad local up says the first pull is about 3 GB, not 600 MB.

  • grad completion bash|zsh|fish|elvish|powershell prints 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, besides inspect/status/show), and grad sources delete works like remove.

  • SDKs: one live stream per run. metrics(follow=True) (Python, TypeScript, Go) and
    grad runs logs --follow now read the metric events of the run's event stream
    (GET /v1/runs/{id}/events), the stream wait() already follows, instead of a second SSE
    connection to /v1/runs/{id}/metrics. The Rust SDK drops runs().stream_metrics and
    wait_with_metrics: use runs().events(id, true) and match RunEvent::Metric, or
    wait_with_events.