Repository navigation
Releases
Releases · Gradiated/grad
v0.2.0-alpha.7
No migrations. The last fixes from the launch review:
- Gradiated Cloud training isn't live yet.
api.gradiated.comdoesn't serve grad's/v1API
until its routing lands, and its bare 404 read like a missing resource. All four SDKs and the
CLI now turn a 404 without a problemcodefromapi.gradiated.cominto a feature-unavailable
error (cloud_training_unavailable, CLI exit 6): "Gradiated Cloud training isn't available
yet; rungrad local upor point at your server with --base-url or GRADIATED_BASE_URL." The
default base URL is unchanged. The README quickstart andgrad --helpstart a server of your
own (grad local up, the Docker Hub images, Helm) and say Cloud is coming soon. - A run is never billed past its
max_cost_usd. The step that carries a run past its cap was
billed in full; it is now billed only up to the cap. The stop, the resume check and the run's
tokens_processedandcost_usdare unchanged. - A transient error while a claimed run or import is built (storage, KMS, a database
timeout) requeues the job, spending the attempt, and answers the claim with a 5xx so the
worker backs off; it used to fail the job for good. An error about the job itself (its dataset
version, labeling eval, starting artifact, source or secret gone) still fails it at once. - docs/CLOUD_MODE.md uses placeholder hosts (
https://cloud.example.internal) instead of
Gradiated's in-cluster Services and routes; the settings and paths grad calls are unchanged. - Cloud: a cached API key stops working at its own
expires_at, not up to 5 s later. - Gradiated Cloud usage export: when billing refuses more than 20 single rows in a tick without
naming anevent_id(an envelope or contract break, not bad rows), the export stops narrowing,
parks nothing, logs an error and backs off like an ingest outage
(grad_usage_export_failures_total), instead of parking every row. - Gradiated Cloud: the public
DELETE /v1/artifacts/{id}/pins/{holder}answers 403
pin_managed_by_cloudforinference:holders (a published model version's pin), so a
workspace admin can no longer unpin a live version's artifact and delete it. Only Cloud's
internal routes remove those pins; self-hosted servers are unchanged. - Cloud: a deleted workspace's purge no longer stalls on a dataset that only evals use. A pass
deleted it while a remaining eval (past the pass's 500-row page, or still running) referenced
it, so the pass failed ongrad_evals_dataset_id_fkey, rolled back and failed the same way
every minute; the dataset now waits for its evals like it waits for its runs. - An artifact upload whose archive is cut off (
EOFErrororzlib.errormid-stream) fails at once
withinvalid_artifact("upload: the archive is truncated or corrupt"); it used to crash the
import worker, retry untilmax_attemptsand fail as "abandoned by its worker". - A checkpoint eval that finishes while its run is still training no longer deadlocks the run's
progress writes (alpha.5's event-ordering lock took the run's rows in the opposite order from
every other run write; Postgres aborted one side withdeadlock detected, a 500 the worker
retried). grad train --wait | headand other pipes whose reader leaves early no longer panic the CLI
with exit code 101;gradignores the closed pipe and exits as it would have (so
grad ... | grep -qstill passes underset -o pipefail).- The web console no longer renders a blank page in a browser whose locale Intl rejects
(Chromium on Linux withLANGunset reportsen-US@posix); it falls back to en-US. The
Datasets empty state points atgrad import FILE --dataset NAME(it named
grad datasets import, which only takes Hugging Face datasets), and the Health page says
evals run on eval workers.
v0.2.0-alpha.6
No migrations. Fixes from the production end-to-end test of alpha.5, Postgres certificate
verification and a console Artifacts page:
- Postgres verify-full. Set
PGSSLROOTCERT(Helm:database.caBundle, a ConfigMap or
inline PEM, mounted into the API pods and the migrations Job) and every Postgres connection
verifies the server certificate and hostname against that bundle whateverssl*parameters
the URL carries (a stalesslmode=no-verifyincluded). For RDS, use the AWS global bundle;
see docs/SELF_HOSTING.md "Postgres TLS". An IP-address host is checked against the
certificate's IP addresses (node-postgres alone checked it againstlocalhost). - Helm:
GRAD_WORKER_AUTOSCALINGis set only whenkeda.enabledand an enabled pool takes
trainjobs (api.workerAutoscalingoverrides it), so a queued run without one says "Waiting
for a worker (none online)", not "Starting a worker (autoscaling)". - Cloud evals before the gateway's eval lane answer
501 inference_unavailablewith
"Evals aren't available on Gradiated Cloud yet";recipe.evalson Cloud is always422 checkpoint_evals_unsupported_on_cloud. - Web console: an Artifacts page (
/artifacts): every artifact as name@version with its
format, base model, provenance, size, age and pins; an artifact's page shows its manifest,
provenance and pins, downloads it and deletes it after a confirmation (a pinned one shows the
409 artifact_pinnedholders). - Artifacts list their pins. Every
Artifact(list, get, a run's artifact, import results,
the internal resolve and pin responses) carriespins(holder,reason,created_at;
[]when unpinned), in all four SDKs. - The trainer logs Hugging Face Hub warnings once, as JSON (no raw stderr duplicate).
v0.2.0-alpha.5
Upgrading runs migration 0010 (node dist/main.js migrate, or the Helm chart's Job); an alpha.4
database (0001 to 0009) upgrades in place. Breaking and behaviour changes, mostly for operators:
- Removed settings.
USAGE_FLUSH_TOKENS,USAGE_FLUSH_SECONDS,
WAITING_FOR_COMPUTE_SECONDS,SOURCE_VERSION_INTERVAL_SECONDS,
SOURCE_VERSION_MAX_RECORDSandGRAD_CLOUD_JWT_AUDIENCEare no longer read; their values
are fixed at the old defaults (1M tokens / 5 minutes, 30 s, 900 s, 100k,training). The
deprecated unprefixedINFERENCE_*/JUDGE_*names are gone too: set
GRAD_INFERENCE_*/GRAD_JUDGE_*. The API container no longer getsGRAD_JUDGE_BASE_URL
(only eval workers use it). 503 capacity_unavailableis waited out, not failed. An eval whose model has no capacity
(a cold serving pool) or whose lane is full (429 past the client's retries) waits in place,
honouringRetry-After, for up toGRAD_EVAL_CAPACITY_WAIT_SECONDS(default 720) per call,
keeping its lease and spending no attempt.EvalRun.waiting_reasonsays why
(capacity_unavailable|rate_limited|inference_unavailable). An inference outage no
longer stores error outputs and zero judge scores.- Cloud refuses checkpoint evals. A run with
recipe.evalsanswers422 checkpoint_evals_unsupported_on_cloudat plan and create, since Cloud serves only published
artifacts: evaluaterun.artifactafter training. - Parked usage rows (Cloud). A usage row billing refuses for good (422/409) is parked
(grad_usage.parked_code,parked_at) instead of holding back every later row. Parked rows
are never deleted and never retried by themselves; docs/CLOUD_MODE.md says how to retry
them. Transient failures still retry forever. - Rust SDK:
datasets().import_hfandartifacts().import_hfarefrom_hf, as in the
other SDKs, andimport_hf_with_secretis gone (setImportSource.secret). - JSON request bodies are capped at 32 MiB (was 64),
413 payload_too_large, and a replica
handles at most two bodies over 1 MiB at once (the rest wait). The SDKs push 8-16 MiB batches. AUTH_MODE=nonechecks Host and Origin. A public DNS name inHostis403 host_not_allowed(DNS rebinding), and a cross-site browser request from an origin outside
GRAD_CORS_ORIGINSis403 cross_site_request. Loopback, IP literals, single-label names
(compose services),.local/.internal/.svcnames and link navigations still work.- Every alert in the chart's PrometheusRule is
severity: warning(GradApiErrorRateHighwas
critical), and the trainer logs JSON lines on stdout instead of[grad-trainer]text on
stderr.
Security
- Artifact uploads: sparse tar members are refused and a tar holds at most 1,024 entries and
10 GiB uncompressed (a 242-byte upload could write 93 GB). A router, decision or reward
bundle'shead_filemust be the format's own head file, JSON configs are at most 16 MiB, and
*in a format pattern no longer crosses/, sosub/model.safetensorsis dropped, not kept
unchecked. A malformed upload is the tenant's422 invalid_artifact, not a retried job. - Hugging Face imports: at most 1,024 files of the format and one hour; a redirect that leaves
http(s) or downgrades https is refused, the token is dropped on any scheme or host change,
and proxy variables are ignored.revisionmust be a branch, tag or commit name. - Cloud console and service JWTs whose
expis more than an hour ahead are refused. - Web UI: a
#key=link never replaces the key of a tab that is already signed in. - The TypeScript SDK's errors redact a presigned URL's query, as Rust and Go do.
- hono 4.13.17 and @hono/node-server 2.1.6 (moderate advisories; none reproduced against
grad's routes). The trainer image's build context has a.dockerignore.
Reliability
Chaos round 2; each has a test in server/api/test/chaos-*.test.ts, and docs/ARCHITECTURE.md
"Failure modes" has the table.
- A Postgres connection black-holed by a failover fails within 35 s and is never reused; the
SSE hub pings its LISTEN connection. Boot-time migrations no longer hit the 30 s statement
timeout. - Object storage outages answer
503 storage_unavailable(was 500); long downloads are no
longer aborted at 120 s. - One failing scheduled source no longer stops every schedule; up to 1,000 sources start per
tick. - A TokenReview outage no longer expires every Kubernetes worker's lease: a review is good for
15 min while the API server is down, never past the token'sexp. A rotated worker token
never fails an eval. - A GPU worker takes the runs no smaller GPU fits first, so big runs aren't starved.
MAX_PREEMPTIONScounts only reclaims in a row that saved no checkpoint, and a reclaimed
worker hands back when its grace ends mid-save. - An artifact delete or the orphan sweep never removes a bundle a new release of the same bytes
references; a pin racing a delete answers 404 (was 500), as does promoting a checkpoint whose
blob just expired. A workspace purge no longer stops at its first 500 pinned objects. A
restarted trainer removes the job directories a killed one left. - A resumed run that ends again has one best and one final checkpoint (it listed two of each).
- A live event stream (SSE, so
wait(onMetric=...)andgrad runs watch) no longer skips an
event that drew its seq before another of the run's events but committed after it (a run's
last metric, typically): a job's events now commit in seq order.
Developer experience
- Evals on
grad local up --dev-models: the stack also startsgrad-dev-inference, a CPU
OpenAI-compatible endpoint, and points the API's and eval worker's inference and judge URLs
at it, sograd evalworks with no flags (was501 inference_unavailable). It serves
test/tiny-qwen3,test/tiny-qwen3-teacher, LoRA and merged artifacts trained on them, and
test/tiny-judge, a deterministic word-overlap judge. URLs exported in your shell still win.
tests/compose/smoke.shevals the trained artifact with a judge and checks the report in the
CLI, the Python SDK and the web UI. scripts/check-docs-snippets.py --localruns the docs' blocks against that stack, and
--compiletype-checks their TypeScript, Go and Rust blocks (56 were never checked; the
README's Rust quickstart didn't compile).- TypeScript and Go raise
FeatureUnavailableErrorfor any 501, like Python and Rust (it was
aServerError, which reads as "try again later"). TypeScript hasartifacts.waitImport(id)
and prints a readable plan fromconsole.log(plan); Python'sartifacts.download_urlis
typedArtifactDownloadUrl. - CLI: a run says "Queued", then "Waiting for a worker (none online | N online, all busy)",
instead of "Waiting for a GPU (0 workers online)" while a worker is about to claim it. Errors
lead with the server's words,grad trainsums up the selected checkpoint in one line, and
grad artifacts listprints readable sizes.grad local upanddownprint a few lines, not
compose's progress. runs.planandruns.createwarn when only CPU workers are online for a GPU-sized model. A
router whose report fold missesmax_quality_dropsays so.grad local upcan sync from a provider on the same machine (GRAD_SOURCES_EGRESS_ALLOW,
host.docker.internal).- A presigned artifact download is saved as
<name>-<version>.grad.tar.gz, not its sha256. - Resuming a run you just cancelled says to retry in a few seconds.
- A test checks that SELF_HOSTING.md and CLOUD_MODE.md list every setting the server and eval
workers read, with the code's defaults. The Helm chart setsGRAD_WORKER_AUTOSCALINGfrom
keda.enabled. - Releases: a registry that rejects an upload no longer holds back the GitHub Release and
Homebrew, and a pushedv*tag publishes with no approval step.
Observability
- One Grafana dashboard, "grad / Training platform" (
deploy/grafana/grad.json, also the
Helm chart's andgrad local up --observability's): overview, queue and scheduling, runs and
jobs, workers and GPUs, evals, sources, billing, auth, API and SSE, dependencies and Loki
logs. It replaces the Overview, Training and Evals & Sources dashboards. - Metrics:
grad_http_errors_total{code},grad_job_failures_totalby kind, recipe and
error_code,grad_worker_auth_total,grad_token_reviews_total,
grad_token_review_duration_seconds,grad_token_reviews_in_flight,
grad_auth_cache_lookups_total,grad_billing_checks_total,grad_price_list_age_seconds,
grad_eval_inference_errors_total{target,reason}(refused calls count even when an eval
stores no output),grad_source_sync_lag_seconds,
grad_maintenance_last_tick_timestamp_seconds,grad_usage_parked_rowsand the workers'
grad_trainer_checkpoints_total. Worker series carry theirpool. docs/METRICS.md lists
them all. - Alerts (
metrics.prometheusRule.enabled, all warnings):GradJobFailureRateHigh,
GradUsagePushLagging,GradUsageRowsParked,GradTokenReviewSaturated,
GradDatabaseErrors,GradStorageErrors,GradMaintenanceStalled, and
GradNoWorkersForQueuedJobsfor eval workers too.GradApiErrorRateHighneeds more than 0.1
requests/s. - Logs: every component writes JSON lines to stdout with
time,level,componentand the
ids that apply (request_id,job_id,run_id,attempt,worker_id,workspace_id);
errors carryerror_typeandstack, and credentials are masked.
Cloud
- The internal listener (
INTERNAL_PORT) starts when either of its route groups is configured:
Cloud's routes (AUTH_MODE=cloud) no longer need lease worker auth and an orchestrator key.
A group that isn't configured is 404. Helm'sapi.internalPortserves it on the ClusterIP
Service<fullname>-internal(never the Ingress), withnetworkPolicy.internalIngressFrom. - Evals: a 404 from the product's eval-...
v0.2.0-alpha.4
Upgrading runs migrations 0002 to 0009 (node dist/main.js migrate, or the Helm chart's Job).
Breaking changes are marked; most affect operators, not SDK code.
Added
- One artifact registry for trained, uploaded and imported weights.
grad artifacts upload PATH --base MODELuploads an adapter, merged model, encoder or router bundle trained
elsewhere;grad artifacts import hf://owner/name[@revision] --base MODELimports one from
the Hugging Face Hub at a pinned commit. An import worker checks the files against
docs/ARTIFACT_FORMATS.md and the base model'sconfig.json(a failed check is422 invalid_artifactnaming the file, CLI exit 5) and releases an ordinaryname@YYYY-MM-DD-n
artifact to download, evaluate or continue training from. Every SDK hasartifacts.upload
and the Hub import (from_hf/fromHf/FromHF/import_hf). - Every artifact has
provenance(the run, the uploader key, or thehf://URI and commit).
grad artifacts delete NAME@VERSION(artifact.delete()) deletes one; an artifact Gradiated
Cloud has pinned for a model version is never deleted (409 artifact_pinned). - Worker authentication modes (
GRAD_WORKER_AUTH): static keys (TRAINER_KEYS_JSON, the
default), Kubernetes service-account tokens checked with the TokenReview API, or lease
tokens an orchestrator mints onINTERNAL_PORT(POST /internal/v1/worker-tokens), bound
to a host, job kinds, a GPU size and an expiry. Workers readGRAD_WORKER_TOKENor
GRAD_WORKER_TOKEN_FILEon every request, so tokens rotate without a restart. - Gradiated Cloud adapters (docs/CLOUD_MODE.md):
AUTH_MODE=cloud
(API keys from the product's auth view, console JWTs against its JWKS),BILLING_MODE=cloud
(Cloud's price list, balances and usage events), evals through the Gradiated gateway,
workspace suspend and delete hooks, artifact pins and resolve for serving, and workspace
secrets sealed with AWS KMS (GRAD_SECRETS_KMS_KEY_ID). Self-hosted servers are unchanged. - A fair queue. A claim goes to the workspace with the fewest running jobs of its kind,
then to that workspace's oldest job, so one workspace's backlog no longer holds up another.
A workspace runs at mostGRAD_MAX_RUNNING_PER_WORKSPACE_{TRAIN,IMPORT,EVAL}(8) jobs of a
kind and queues at mostGRAD_MAX_QUEUED_PER_WORKSPACE(500); past that, creating a job
answers429 queue_limit, which every SDK raises at once asQueueLimitErrorinstead of
retrying. Workers only get runs whosemin_gpu_memory_gbfits their GPU. Runs carry
queue_positionandqueue_message, and the CLI, TUI and web UI say why a run waits
("Queued behind 3 runs", "Waiting for a GPU with ≥46 GB; ..."). - Usage reports.
grad usageprints a period's cost and tokens by kind (training, eval,
scoring, labeling, teacher) with the top runs and evals;--by day|week|month|model|recipe|kind
groups it and--from/--toset the period.GET /v1/usage/summary,usage.summary(...)in
every SDK, and a usage page in the web UI. The old listing isgrad usage list. - Source controls. Filters are checked per provider (
422 source_filter_unsupportedor
source_filter_invalid) and sent to the provider's API where it supports them.
sample_rate,max_records_per_syncandmax_records_per_daycap what a source brings in,
version_interval(default 15 min) makes a busy source commit fewer dataset versions, and
grad sources update(PATCH /v1/sources/{id}) changes any of them from the next sync. - Browser clients:
GRAD_CORS_ORIGINSallows listed origins on/v1, andgrad artifacts download REF --url(GET /v1/artifacts/{id}/download-url) prints a presigned download. - A maintenance sweep deletes job blobs no artifact or dataset part references once they are
ORPHAN_BLOB_DAYS(7) old. - Homebrew:
brew install gradiated/tap/grad. The release workflow updates the formula.
Changed
- The web UI is restyled in the Gradiated brand: dark by default with a light theme, a
phase stepper and live indicator on runs, smoothed loss and throughput charts with a hover
readout, a cost cap line once spend nears it, and a runs table that fits at 1024 px.
Storybook renders every component and page state (pnpm -C server/ui storybook). - Evals run on eval workers, not in grad-server. Evals,
dataset.score(), router labelling,
distillation's teacher answers and checkpoint evals areevaljobs claimed bynode dist/main.js worker --kinds eval(the grad-server image; Helm'simportpool runs one, and
grad local upaddsgrad-eval-worker). Restarting the API no longer interrupts an eval.
Breaking (operators):GRAD_INFERENCE_API_KEY,GRAD_JUDGE_API_KEYand
EVAL_CONCURRENCYmove to the eval workers, andEVAL_EXECUTORis gone. - Helm defaults to
workers.auth=kubernetes: one ServiceAccount per pool and no worker
keys (workers.auth=statickeeps the generated keys). Training pods run under a low
PriorityClass (<release>-training-low), so your own workloads preempt them. - Storage is S3-compatible only. Breaking:
S3_BUCKETis required, and local-disk
mode (STORAGE_DIR,BLOB_SIGNING_SECRET, the/blobs/*routes) is gone.grad local up
runs SeaweedFS (S3 on127.0.0.1:18786) and migrates with a one-shotmigrateservice.
Data in an old local stack'sgrad-storagevolume is not migrated: push datasets again.
S3_PUBLIC_ENDPOINT(Helmstorage.s3PublicEndpoint) signs client uploads for another host. grad local uppublishes the API and web UI on127.0.0.1:18787, Grafana on18788and
Prometheus on18789(were8787,3000and9090). It moves a busy default port to a
free one and says so, remembers the choice, andgrad local statusprints the URLs.- Released artifacts live under
artifacts/<workspace>/<sha256>, the one prefix serving reads;
checkpoints stay under their job. Manifests are format_version 2 (they addprovenance);
readers accept 1 and 2. - Event streams share one reader per API replica (LISTEN on
grad_job_events) instead of
polling Postgres per stream: with 1,000 streams, about 40 queries a second instead of
2,000, and under 0.1 s from write to client. - Import workers upload dataset parts (gzip JSONL, up to 50k records or 64 MB) straight to
storage; grad-server never carries the records. Reading a large synced dataset is about ten
times faster (180k records: 71 s to 6 s). - Source syncs use each API's largest page, fetch traces and scores side by side, and re-read
the last hour of feedback for edits every 15 minutes (Phoenix: 7 days) instead of a week
every minute.GRAD_SOURCES_<PROVIDER>_REQUESTS_PER_MINUTEraises a provider's rate. - Breaking: a
UsageRecord'skindis the usage kind (trainingreplacesrun; evals
areeval,scoring,labelingorteacher). Rustclient.usage().listtakes a
UsageQuery. - Breaking (Cloud operators only):
CLOUD_INTERNAL_API_URL's/auth/verifyand
billing/usage/cursorcalls andUSAGE_EXPORT_LAG_SECONDSare gone. - The default
batch_sizeis a quarter of the training examples (at least 8) when that is
under 128, so a small dataset takes several optimizer steps.runs.planadds
cost_breakdown(training, teacher and eval), and its estimate includesrecipe.evals. - npm: until 1.0 every release, alpha included, gets the
latestdist-tag, sonpm i @gradiated/gradinstalls the newest one (it was stuck on alpha.1).
Removed
- The deploy surface. grad-server drops the
/v1/deployments,/v1/route,
/v1/embeddingsand/v1/feedbackstubs; the SDKs and CLI dropdeploy(),deployments,
grad deployandDeployUnavailableError. On Gradiated Cloud you publish an artifact as a
model version through the Models API; self-hosted, download it and serve it yourself. - The trainer protocol's
POST /v1/trainer-jobs/{id}/records: imports upload parts instead.
Fixed
- Plans estimate what runs bill: each base model's tokenizer density (the dev models' was off
by 2.3x), both sides of every DPO and reward pair, and whole batches per epoch. - A second run under a queued or running run's name warns in the plan and on create
(run.warnings); CLI commands given a shared name pick the newest and say so. grad runs watchand a re-attachedgrad train --waitshow the whole run from its first
event, and the empty chart says what the run is waiting for.- A Postgres restart, failover or killed backend no longer crashes grad-server: the request
answers503 database_unavailableand the pool drops the dead connection. - Concurrent identical pushes and promotes no longer make duplicate versions or releases
(migration 0002), andrecord_countcounts a record pushed or synced again once. - A retried eval cancel or run resume returns the current state instead of 409, and
dataset.scorehonoursIdempotency-Key, so a retry after a lost response starts nothing new. - A restarted worker container takes a new, billed attempt instead of its old lease.
- An eval's or import's final status commits with its bill; a database blip during an eval is
retried in place instead of waiting out the lease; an eval worker waiting on the regex
sandbox no longer exits mid-eval. - Leases follow the database clock on a monotonic clock, so a host clock step no longer
requeues healthy jobs. - A source sync that fails waits for its in-flight provider requests before returning.
- Databases created by an earlier release get the usage-report indexes (migration 0009); they
had been added to 0001 after it shipped.
Security
- Kubernetes worker auth only sends JWTs that name audience
grad, a mapped service account
and a future expiry to TokenReview, at most 8 at a time per replica, so a flood of tokens on
the public port can't turn into unbounded Kubernetes API calls. - A lease token ...
v0.2.0-alpha.3
Changed
- npm publishes with trusted publishing (OIDC); this is the first crates.io release of
grad-sdk
andgrad-cli. The Go module tag step accepts a tag pushed by hand. - The images are published to Docker Hub as
docker.io/gradiated/grad-serverand
docker.io/gradiated/grad-trainer, with the same tags mirrored on GHCR.grad local up, the
embedded compose file and the Helm chart default to Docker Hub.