Repository navigation
v0.2.0-alpha.5
Pre-release
Pre-release
·
31 commits
to main
since this release
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-versions call is
422 artifact_not_servable(was a
retried 503); the call gets 10 minutes (the product copies the bundle) and retries 5xx. Evals
call the gateway with each model's canonical-case id (Qwen/Qwen3-8B);
GRAD_EXTRA_MODELS_JSONentries take an optionalserving_id. - The
gradiatedsource answers501 source_unavailable("coming soon") unless
GRAD_CLOUD_TRACES_ENABLED=true, instead of failing at sync time. - A product-DB failover keeps recently answered API keys working for up to 5 min; the JWKS
refresh never blocks a request and a rotated key verifies at once. A replica booted during a
price-list outage answers503 billing_unavailable, not422 unknown_model, and a heartbeat
checks one balance per workspace at a time.