Changelog
What changed in each grad release. The server, trainer, Helm chart, the four
SDKs and the CLI share one version.
Copied from grad's CHANGELOG.md. Until 1.0, a minor release may break the API; the server runs any migrations when it starts (the Helm chart runs them as a Job first).
0.2.0-alpha.16#
Cloud mode always keeps integrations in the main API, integration statuses take the main API's vocabulary, and grad <resource> view opens a resource's page (the Gradiated console on Cloud, grad's web UI elsewhere). One additive migration (0027) renames the stored statuses. On Gradiated Cloud, deploy the main API's integration routes (with their KMS key) before this release: Cloud grad calls them for every integration.
Integration
statusispending,activeorfailing(breaking).untestedbecomespending, andokbecomesactive. This covers the API, all four SDKs, the CLI and the web UI. Migration 0027 rewrites grad's stored values and keeps the old ones valid while the previous release still runs.Cloud mode (
AUTH_MODE=cloud) always uses the main API's integrations.GRAD_CLOUD_INTEGRATIONSand the boot-time move of grad's own integrations are gone. On Cloud, grad ignores rows in itsgrad_integrationstable and logsN local integrations are ignored in Cloud modeonce at boot. WithoutCLOUD_INTERNAL_API_URLandCLOUD_SERVICE_TOKEN, integrations answer503 integrations_unavailable.allowed_hostsis gone from the Cloud contract, in records, creates and patches. A credential only ever goes to its integration'shost. Integration ids are opaque:int_…self-hosted, UUIDs on Cloud.grad <resource> view(CLI,GET /v1/whoami, Helm):- Added
grad runs view RUN(runs and interactive trainers),grad datasets view NAME,grad evals view EVAL,grad artifacts view REF(NAME@latesttoo) andgrad checkpoints view CKPT. Each resolves its reference like the group'sgetand opens the resource's page. - On Gradiated Cloud these open exactly the resource's
console_urlfrom the server (the CLI builds no console path), signed in by the browser's console session, with no key in the URL. On a local or self-hosted server they open grad's own web UI and hand over the profile's key once in the#key=fragment, as before.--no-openprints the URL;--jsonreturns{url, mode, opened}. - Breaking (CLI):
grad uitakes no run or trainer id any more. It opens the runs page (/runs, on the console on Cloud);grad ui RUNexits2and names theviewcommand to use. - Resource groups answer to their singular:
grad run,dataset,artifact,checkpoint,model,env,key,integrationandsource(grad eval viewworks too). DatasetandArtifact(get and list) gainconsole_url, andGET /v1/whoamireturnsconsole_url(the console's runs page), whenGRAD_CONSOLE_URLis set. Every console path now comes from one server helper (consolePathinserver/api/src/deps.ts). Helm setsGRAD_CONSOLE_URLfromcloud.consoleUrl.
- Added
0.2.0-alpha.15#
Gradiated Cloud integrations follow the main API's contract (record versions, 409 integration_changed, https-only hosts, complete credential sets). Zero new database migrations. On the switch to GRAD_CLOUD_INTEGRATIONS, an integration the main API can't take (incomplete credentials or a plain-http host) is logged as integration not moved to Cloud and stays in grad's database with what it has: reconnect it in the console, then delete grad's copy.
- Cloud integrations follow the main API's contract. Everything below is inert while
GRAD_CLOUD_INTEGRATIONSis off, except https-only hosts: in Cloud mode (blockPrivateUrls), an integration host must be https whichever side stores it, both when it's set and when a credential is sent.- Updates send back the record
versionthey were based on. A change in between is409 integration_changed: grad re-probes a connection test up to three times and returns the conflict for an update. - Host changes always carry credentials, and test results carry
last_checked_at. - Integration hosts must be https on Cloud, both on input and at send time.
- The move to Cloud reports, and doesn't move, an integration with incomplete credentials or a plain-http host.
- Updates send back the record
0.2.0-alpha.14#
Integrations replace workspace secrets across the API, SDKs, CLI and web UI. One additive migration (0026) turns referenced secrets into integrations; a secret's credentials carry over only to hosts it was allowed to reach. Roll forward only: a release before 0026 can't read integration credentials set after it. Gradiated Cloud keeps grad's own store until GRAD_CLOUD_INTEGRATIONS is switched on (see docs/CLOUD_MODE.md, Integrations: not a rolling update).
- Integrations replace workspace secrets (breaking):
- Added
/v1/integrations(create, list, get, update, delete, test): account-level connections to Langfuse, LangSmith, Braintrust, PostHog, Phoenix, Hugging Face, W&B and MLflow with typed, write-only credentials (Langfusepublic_key+secret_key, neverPK:SK), a server-derived host binding, a connectionstatus(ok,failing,untested) andused_by. Deleting one in use is409 integration_in_usewithused_by. - Sources, Hugging Face dataset and artifact imports, and W&B/MLflow loggers take
integrationinstead ofsecret; it may be left out when the workspace has exactly one integration of that provider (422 integration_ambiguouslists several). Source providers and loggers losehost,secretandtracking_uri(they live on the integration). Rotating an integration's credentials resumes its paused sources. - Removed
/v1/secrets,grad secrets, the SDKs'secretsresources (SecretRef,SecretLike,secretName) andallowed_hosts. Thesecrets:read/secrets:writescopes are nowintegrations:read/integrations:write. - CLI:
grad integrations add|list|get|test|update|rm(hidden prompts, stdin or--from-envwith each provider's own variables;addtests the connection) andgrad sources add DATASET --from INTEGRATION. - The migration turns every referenced workspace secret into an integration and rewrites the references; unreferenced secrets are reported, not guessed. On Gradiated Cloud (
GRAD_CLOUD_INTEGRATIONS=true), integrations live in the main API and grad keeps no credentials. - The web UI's Settings page manages integrations (test, rotate, delete while unused) instead of secrets.
- Added
0.2.0-alpha.13#
Router by_session multi-turn split preservation, qwen/qwen3-4b & qwen/qwen3-8b router support, TLS-aware trainer endpoints with unpinned next_seq resync, and Python/TypeScript SDK ergonomics polish. Zero new database migrations.
- Router Recipe & Policy Fixes (
server/api,server/trainer, Python SDK):- Enabled
qwen/qwen3-4b(lr=4e-4) andqwen/qwen3-8b(lr=3e-4) forRouterRecipein the model catalog. - Preserved shared multi-turn
session_idacrossRouterRecipeby_sessionsplits in both the API planner and trainer (falling back togroup_idonly whensession_idis absent or inconsistent within a prompt group), preventing cross-split session leakage. - Hardened
RouterPolicy.route()/evaluate()to rejectNaN/Inf/boolcandidate probabilities and distinguish explicitlambda_=None/threshold=Nonefrom omitted defaults via a sentinel. - Added typed
EvalReport&RouterParetoSummaryrouter fields, improvedrun_byo_eval(session_id,score_name,pricing,error_samples), and surfaced clearer router skip reasons when records lack numeric scores.
- Enabled
- Trainer Endpoints, Losses & Billing (
server/api,server/trainer, Python SDK):- Fixed
POST /v1/trainers/:id/endpoint-tokensto honor validatedx-forwarded-proto/x-forwarded-hostheaders behind TLS-terminating ingress (with HTTPS preservation in the Python SDK), preventingConnectTimeouton Cloud trainer endpoints. - Automatically resynced
next_seqin PythonTrainerafter unpinnedtrainer.endpoint()traffic to prevent409 seq_conflicton subsequent ops. - Fixed
GRPOKL.stats/SFTKL.statsentropykwarg handling ingrad_trainer/losses.py, exposedTrainer.cost_usd&Trainer.tokens_processed, and added backward-compatibledatasets.push()fallback +/v1/whoamibare-404 handling.
- Fixed
- SDK Ergonomics & Breaking DX Cleanups (Python & TypeScript SDKs):
- Breaking: Changed
Dataset.records()/Datasets.records()solimitcaps the total yielded records (addingpage_sizefor server pagination control) and yieldsAttrDictrecords supporting bothr["messages"]andr.messages. - Breaking: Changed
Trainer.log_metrics(metrics, *, step=None, timestamp=None)(Python) andTrainer.logMetrics(metrics, { step?, timestamp? })(TypeScript) to metrics-first withstepdefaulting to the trainer's current step. - Added
SaveStateResult.id/.checkpoint_id/.step,SampleResult.text/.texts,AttrDictconversion forSample.message,thinking=forwarding onsample()andsample_stream(), and disabledAPIObjectsequence fallback (__iter__ = None) so accidental iteration raisesTypeErrorinstead ofKeyError: 0.
- Breaking: Changed
0.2.0-alpha.12#
Server-managed GRPO recipe, server-side OpenAI/Anthropic trainer & snapshot endpoints, Qwen3 multi-turn prefix reuse, cross-process OAuth refresh locking, cost-aware router utility calibration, unified grad runs CLI & portal UI, and dataset/RL correctness fixes. Zero new database migrations.
- Server-Managed GRPO Recipe & Promoted RL Losses:
- Added first-class server-managed
grporecipe across API, planner, trainer (GRPOKLwith single-GPU initial-weight KL regularization and built-in deterministic validatorsmath,exact_match,contains,final_number,choice,json,non_empty,regex), OpenAPI, all four SDKs (GRPORecipe), and CLI (grad train --recipe grpo --validator ..., supportinggroup_std,dr_grpo,rloo, and Clip-Higherclip_low/clip_high). - Promoted additional server losses (
CISPO,DRO,StableReinforcewith bounded k3 KL guard) and addedTrainer.train_step/trainStep, true token-level Shannon entropy in RLforward_backward,Trainer.wait_ready(), and accuraterecipe_kindstamping on trainer exports.
- Added first-class server-managed
- Server-Side OpenAI & Anthropic Trainer/Snapshot Endpoints, SSE Drain & Multi-Turn Prefix Reuse:
- Added OpenAI (
/v1/trainers/{id}[/snapshots/{seq}]/openai/v1/chat/completions) and Anthropic (/v1/trainers/{id}[/snapshots/{seq}]/anthropic/v1/messages) trainer endpoints with short-lived trainer-scoped sample-only tokens (POST /v1/trainers/{id}/endpoint-tokens), server-side per-session token-aligned trajectory capture (GET/DELETE /v1/trainers/{id}/sessions), and thinendpoint()/trajectories()helpers across Python, TypeScript, Go, and Rust SDKs (removing the local Pythonproxy.pyHTTP server while keepinggrad proxyin Rust untouched for local BYO rollouts). - Fixed server SSE
donestream-drain races, immediatetemplate_revisionpopulation onPOST /v1/trainers, GoSampleStream.DeltasSSE error propagation, and Qwen3 multi-turncontinueprefix reuse (reset=False).
- Added OpenAI (
- Router Cost-Aware Calibration & Planning Diagnostics:
- Upgraded
RouterRecipeto cost-aware utility routing (argmax_m (p_m - λ c_m)with per-candidate temperatures and threshold fallback), richeval_reportdiagnostics (selection_eval_lossvsheldout_eval_loss,candidate_breakdown,baselines,pareto_curve,truncation_stats), zero-dependencyRouterPolicyin Python & TypeScript, andruns.planrouter_summary.
- Upgraded
- Auth, Uploads, Datasets & Validators:
- Fixed cross-process OAuth 2.1 refresh-token races across Python, TypeScript, Go, and Rust CLI via sibling OS file locking, reload-before-refresh, and atomic
config.jsonwrites. - Fixed Rust S3 presigned PUT
403 SignatureDoesNotMatch(stopped injecting unsignedcontent-type) and separated storage upload errors from Grad API scope hints. - Added atomic multi-chunk
datasets.push()viaupload_id,DELETE /v1/datasets/{name}(grad datasets delete) with emptyv0cleanup on failed initial imports, expanded HF column mapping, shared conversation prefix stripping for DPO/reward pairs with explicitprompt, preserved per-messagetrainandnameinimport_file, cleaned upexpected_outputsemantics (never overwriting existing assistant CoT turns or hijacking DPO/reward), upfrontDecisionModelRecipeschema validation, and sixMathEquivalence/IFEvalvalidator fixes.
- Fixed cross-process OAuth 2.1 refresh-token races across Python, TypeScript, Go, and Rust CLI via sibling OS file locking, reload-before-refresh, and atomic
- Unified CLI, Portal UI, Evals & SDK Polish:
- Unified
grad runs list/get/watch/cancelacross managed runs and interactive trainers (trn_*auto-dispatch), unifiedgrad usage list --run trn_*, updatedPaused ($0/hr)copy, workflow-orderedserver/uinav + Settings page, and addedGET /v1/whoami+grad whoami+ Cloud-safe501 inference_unavailableerrors. - Fixed
save_state(name, ttl_s)persistence and"trainer_state"checkpoint format reporting,sampler.policy("base")label /"artifact:"prefix,Gate(rule="delta")small-sample support,mode="env"evalby_scorer/mean_turns, TypeScriptSampledAssistantMessage→ChatMessageassignability +reasoningContentcodec, GoUsageTrainer, andgrad rendermulti-lineTRAIN │gutters +--preserve-thinking.
- Unified
0.2.0-alpha.11#
Local BYO-eval proxy, GEPA prompt optimization, local Docker environments & /v1/environments registry, OAuth 2.1 login, trainers observability, and portal UI polish. Migrations 0023_drop_ephemeral_pg_state.sql, 0024_trainer_metrics_and_total_steps.sql, and 0025_environments.sql.
- Local BYO-Eval Rollout Proxy & GEPA Prompt Optimization:
- Python SDK:
RolloutProxy,RolloutSession,start_rollout,run_byo_eval,ByoEvalReport,optimize_prompt(GEPA reflective prompt optimization with Pareto frontier and unified diff),from_braintrust_score,from_langsmith_feedback, andto_sft_records/to_dpo_pairs/to_grpo_groups. - TypeScript SDK: zero-dependency
createRolloutProxy,startRollout,runByoEval,fromBraintrustScorer,fromLangSmithFeedback,toSftRecords, andtoDpoPairs. - CLI: pure-Rust
grad proxyloopback OpenAI + Anthropic proxy with BYOK pass-through (secret-redacted), Gradiated model routing,--system-prompt-file, andgrad.trajectory/1JSONL capture.
- Python SDK:
- Local Docker Sandboxes, Harbor &
/v1/environmentsRegistry:SandboxProvider/DockerProvider/DockerSandbox,SandboxEnvironment,HarnessEnvironment, andHarborEnvironmentfor local Docker execution alongside/v1/environmentsregistry CRUD (grad envs push|pull|list|get|delete,client.environments.load(...)) and monorepo scaffolding (grad envs init --from --subdir --base-image,grad envs from-git,grad envs verify --oracle --check-baseline,grad envs shell).
- Portal UI & Brand Polish:
- Updated
gradUI and docs to the simplified geometricGRADwordmark, polished runs and run-detail views, added the Trainers observability tab and Environments view, and expanded Storybook.
- Updated
- Auth, Trainers, Recipes & Reliability:
- Added OAuth 2.1 PKCE and RFC 8628 device code login (
grad login --device) with auto-refresh across SDKs and CLI, plus logout revocation. - Added
grad trainers watchlive TUI, trainer metrics & step tracking, GPU batching for seeded andmode=sampleops, Redis-backed ephemeral state & op-stream pub/sub,EmbeddingRecipeoverhaul, liveSnapshotProxystreaming, local zero-dep validators, and standardized CLI/SDK verbs across all four SDKs.
- Added OAuth 2.1 PKCE and RFC 8628 device code login (
0.2.0-alpha.10#
Trainers: an interactive training loop on grad's GPUs (docs/TRAINER_API.md). Migrations 0014_trainers.sql,
0016_trainer_lanes.sql, 0017_eval_env_and_gates.sql, 0019_trainer_ops_order_index.sql,
0020_checkpoint_ttl_and_metadata.sql, 0021_trainer_mode_and_sampled_usage.sql, and
0022_stream_media_hotswap.sql (expand-only). Before upgrading, note:
Breaking (API):
Checkpoint.run_idis nullable (a trainer's checkpoints havetrainer_id), andArtifactProvenancehastrainer_idand thesourcevaluetrainer.Breaking (API, SDKs, CLI, Web UI): released artifacts are now strictly immutable — removed artifact deletion (
DELETE /v1/artifacts/{id},artifacts.delete,grad artifacts delete, UI Delete button) and artifact pinning (POST/DELETE /v1/artifacts/{id}/pins,PUT/DELETE /internal/v1/workspaces/{ws}/artifacts/{id}/pins/{holder},Artifact.pins,ArtifactPin), as well as the internal workspace-state push endpoints (GET/PUT /internal/v1/workspaces/{ws}/state).GET /internal/v1/workspaces/{ws}/artifacts/{id}continues to work and accepts bothartifacts:readand legacyartifacts:pinJWT scopes for zero-downtime rolling upgrades; Postgres tables remain expand-only (no destructiveDROP TABLE), and checkpoint expiration (ttl_s,PATCH /v1/checkpoints/{id},410 checkpoint_expired) is unchanged.Upgrade grad-server before trainer workers: a worker of this release claims
trainerjobs by default (GRAD_WORKER_KINDSnow defaults totrain,import,trainer; the Helm GPU pool'skindsare[train, trainer]), and an older server refuses that kind in a claim.Trainers (
POST /v1/trainers,client.trainers.create(...)in all four SDKs,grad trainers list|show|close, and a Trainers page in the console): a LoRA on one GPU worker that a client drives withforward_backward(cross_entropyorlinear; Python'slosses.CustomLosscomputes any loss of the log-probs in local torch and sends its gradient as alinearloss, withgrad-sdk[torch]),forward(current, base or starting weights),optim_step(AdamW),sample,save_state,export(apeft_loraartifact) andrender. Every op returns a future and carries a client-assignedseq, so retries are idempotent and ops run in order. Per-token arrays are binary on the wire, and large requests and results live in storage, not in Postgres. An idle trainer parks (state saved, GPU released, nothing billed) and resumes on the next op; a drain parks it without losing the running op; a lost worker fails it loudly with the checkpoint to resume from.max_cost_usdis a hard cap checked before every op, and usage flows through the Cloud usage export askind: trainer.Trainer futures compose with async code. Python:
await futwaits without blocking the event loop, andfut.future()is the op as aconcurrent.futures.Future(as_completed,asyncio.wrap_future); one background long-poll per trainer serves every awaited op. TypeScript: anOpFutureis aPromiseLike, soawait futandPromise.all([a, b])work without.result().Multimodal Vision & Audio support across SFT, Trainer API, Evals, all 4 SDKs, and CLI:
- Added
modalities(["text"],["text", "image"],["text", "image", "audio"]) toTrainableModel,Trainer,JudgeModel, and catalog models (qwen/qwen3.5-*,qwen/qwen3.8-27b,qwen/qwen3.6-35b-a3b,google/gemma-4-{12b,26b-a4b,31b}-it→ vision;google/gemma-4-{e2b,e4b}-it→ vision + audio), surfaced ingrad models list. - Added strict API validation for OpenAI
image_url(inline PNG/JPEG/WebP base64 data URIs ≤ 5 MiB; zero SSRF: rejectshttp(s):///file://with422 invalid_media_uri) andinput_audio(RIFF/WAVE ≤ 10 MiB, rejected if non-WAV with422 invalid_media), role gating (422 invalid_media_role), modality gating (422 unsupported_modalityacross SFT, non-SFT recipes, Trainer ops, and Evals), bounded per-datum/per-op limits (≤ 8images,≤ 4audio clips,≤ 20 MiBdecoded media/op,32 MiBtrainer body limit), media-aware token bounding (4096/image,1024/audio), and eval scoring base64 stripping with multimodal judge passthrough. - Added pure-PIL (
pillow==13.0.0, zerotorchvision) + pure-Python RIFF/WAVE & NumPy FFT 16 kHz resampler multimodal pipeline ingrad_trainer(multimodal.py,templates.py,engine.py,session.py,recipes/sft.py,sampler.py,_vllm_worker.py) supportingQwen3_5ForConditionalGeneration/Qwen3_5MoeForConditionalGenerationandGemma4ForConditionalGenerationwith zero regression on text-only varlen fast paths,/dev/shmsha256-deduped vLLM media IPC withauto-mode fallback toHFSampler, and processor saving on merged exports. - Added zero-extra-dependency multimodal helpers (
image_part/audio_part/MediaItem/extract_media, plusImage/Audioin Python and*FromFilein TS/Go/Rust) and client-sideSampledPrompt.media/TokenSegment.mediapropagation (Datum.from_sample,Datum.from_trajectory,SnapshotProxy) across Python, TypeScript, Go, and Rust SDKs.
- Added
RL losses on trainers:
importance_sampling,ppo(clip_low,clip_high; recommended default for async/stale rollouts),cispo(clip_low,clip_high), anddro(beta, strictly masked byweights) read the datum fieldssampling_logprobsandadvantageswithweightsas the mask, and reportkl_sample_train,kl_sample_train_v2,sample_train_max_diff,ratio_mean,ratio_max, and (ppo/cispo)clip_fraction.forwardandforward_backwardtaketemperature(the soft-capped logits divided by it, as the sampler does).Calibrated
lr="auto"onoptim_step(all 4 SDKs):optim.AdamW(lr="auto", objective="sft"|"rl"|"dpo")resolves the model's calibrated LR server-side fromcatalog.ts(including calibratedrlLRs across trainable Qwen3/3.5/3.6/3.8 and Gemma 4 models), exposesTrainer.calibrated_lrs, returns the applied numericlronOptimStepResult, and refuses uncalibrated models/objectives with422 uncalibrated_model.top_k,top_logprobs, andprompt_logprobsonsample(bothHFSamplerand colocatedVLLMSampler, all 4 SDKs):sampleacceptstop_k(1..1000),top_logprobs(0..20, returning per-token[{token_id, logprob}]sorted descending from the processed sampling distribution), andprompt_logprobs(bool, returning per-prompt-tokenfloat32log-probs with index 0 =0.0matchingforward()).Checkpoint TTLs,
save_state(metadata=...), and410 checkpoint_expired(migration0020, all 4 SDKs, CLI, Web UI):POST /v1/trainersacceptscheckpoint_ttl_s(300..7776000s) for automaticautosave/parkcheckpoints;save_stateaccepts optionalttl_s(300..7776000, omitted/null = permanent) andmetadata(JSON object ≤ 16 KiB serialized UTF-8) returned onSaveStateResult.checkpoint.{expires_at, metadata}; finalclosecheckpoints stay permanent; maintenance sweeps expired trainer checkpoint S3 blobs outside DB locks while keeping tombstone rows so resuming returns410 checkpoint_expired.Expanded built-in verified HF benchmarks (4 → 13) +
math_equivalenceandifevalvalidators (all 4 SDKs, CLI): added pinned, public benchmarksarc_easy,hellaswag,winogrande,truthfulqa_mc1,boolq,openbookqa,commonsense_qa,math500(HuggingFaceH4/MATH-500, 500 rows, scored withmath_equivalencesupporting nested\boxed{...}, fractions, radicals,\pi/trig, intervals/tuples/sets, symbolic probing, and numeric tolerance), andifeval(google/IFEval, 541 rows, deterministic verifier for all 25 Google IFEval instruction IDs returning exactsatisfied / totalfraction).StableReinforceRL loss + per-stepentropyandclip_fractiondiagnostics (all 4 SDKs): addedstable_reinforce(clip_low=0.2,clip_high=0.28,kl_coef=0.0with non-negative k3 KL penalty; Pythongrad.StableReinforce/losses.StableReinforce, TSlosses.stableReinforce, Gograd.StableReinforce, RustLoss::StableReinforce) and surfaced Monte-Carloentropy(-mean(sampling_logprobs)) across all RL losses plusclip_fractionon clipped RL losses.32K Trainer context, Qwen3.5 vLLM default, true token-by-token
samplestreaming, content-addressed media uploads, and warm checkpoint/artifact hot-swap (migration0022, all 4 SDKs):- Raised
TRAINER_MAX_SEQ_LENfrom8192→32768(min(model.max_context_tokens, 32768)), enabled"Qwen3_5ForConditionalGeneration"inDEFAULT_VLLM_ALLOW_ARCHS, and capped colocatedVLLMSamplermax_model_lensafely tomin(model_max_pos, 32768)(respectingGRAD_VLLM_MAX_MODEL_LEN). - Added token-by-token SSE streaming on
sample(stream: true,GET /v1/trainers/{id}/ops/{op_id}/stream, workerPOST /v1/trainer-jobs/{id}/ops/{op_id}/chunks, backed by Valkey/Redis Streams via optionalREDIS_URLwithXADD MAXLEN ~ 2000, 5 min TTL, andXREAD BLOCK, falling back to a bounded in-memoryOpStreamBuswhenREDIS_URLis unset — zero Postgres chunk writes, never coalesced on the sample lane). Addedvalkey/valkey:8-alpineto Docker Compose and optionalredis.url/redis.existingSecret/networkPolicy.redisEgressto the Helm chart. Addedsample_stream/sampleStream/SampleStreamacross Python, TypeScript, Go, and Rust SDKs, and upgradedSnapshotProxy(OpenAI/v1/chat/completionsand Anthropic/v1/messages) to stream live token deltas while preserving exactTrajectoryandsampling_logprobscapture. - Added content-addressed, workspace-isolated media uploads (
POST /v1/mediaaccepting JSON or rawimage/png,image/jpeg,image/webp,audio/wav,GET /v1/media/{id}) deduplicated by(workspace_id, sha256)ingrad_media+ S3, usable viagrad://media/med_...,input_audio.media_id, orMediaItem.media_idwith a bounded worker LRUMediaCacheandclient.media.upload/gethelpers across all 4 SDKs. - Added instant checkpoint/artifact hot-swap on warm
mode: "sample"sessions viaweights: "checkpoint:<id>" | "artifact:<id>" | "base" | "initial"onsample, validated for workspace ownership (404), expiration (410 checkpoint_expired), base-model compatibility (422 incompatible_base_model), and sample-only mode (422 invalid_weights), backed by a bounded worker LRU_AdapterCache(vLLM externalLoRARequest+ HF PEFT/base swap). - Upgraded the Web Console
/playground(server/ui) with live token-by-token SSE streaming (stream: true+GET /v1/trainers/{id}/ops/{op_id}/streamwithAuthorizationheaders, live<think>folding, Stop/Cancel abort, and polling fallback), single-GPU warm checkpoint/artifact/base hot-swap (including shared single-GPU Compare A/B when targets sharebase_model), content-addressedPOST /v1/mediaattachment uploads (grad://media/<id>/media_idreuse across turns), and updated Phase 11 "Copy as Python" (sample_stream,weights,grad.Image.upload/grad.Audio.upload).
- Raised
Opt-in LoRA Multimodal Projector Adaptation & Multimodal DPO / Off-Policy Distill / Reward Recipes (all 4 SDKs, CLI):
- Added optional
adapter.train_multimodal_projector(defaultfalse) on LoRA runs and trainers (grad.Lora(..., train_multimodal_projector=True), TSadapters.lora({ trainMultimodalProjector: true }), GoLoRA{TrainMultimodalProjector: true}, RustAdapterSpec/TrainerOptions.train_multimodal_projector). Rejected synchronously with422 unsupported_modalityon text-only models; when enabled on multimodal models, targets only the vision/audio-to-language projector/merger linear layers (visual.merger.*on Qwen3.5/3.6/3.8,embed_vision.*/embed_audio.*on Gemma 4) alongside language decoder layers while keeping heavy vision/audio encoder backbones frozen, persists cleanly inadapter_config.jsonand trainerengine.json, and keepsGRAD_SAMPLER=autosafe by falling back toHFSampler(rejecting explicitGRAD_SAMPLER=vllmwithRecipeConfigError). - Enabled multimodal (
imageandaudio) datasets acrossDPORecipe(preference pairs preserving exact paddedsdpa+position_ids=Nonepolicy & disabled-adapter reference log-probs), off-policyDistillRecipe, andRewardRecipe(pairwise & pointwise multimodal scoring with left-truncation media-token protection), plus calibrateddistill/rewardLRs on all trainable multimodal catalog models. On-policydistill, incompatible recipes (embedding,classifier,router,cartridge,decision), and text-only models continue to reject multimodal datasets with422 unsupported_modality, and immutable dataset records/evals consistently reject Trainer-API-scopedgrad://media/med_.../input_audio.media_idreferences synchronously with422 invalid_media_uri.
- Added optional
Decoupled
SamplingClient(mode: "sample"on Trainers, migration0021, all 4 SDKs):POST /v1/trainersacceptsmode: "train" | "sample"(default"train"), allowing eval-only catalog LLMs (e.g.qwen/qwen3-32b) in sample mode, rejecting training/mutation ops (forward_backward,optim_step,save_state,export) with422 sample_only_trainer, skipping optimizer/gradient buffers and parking without a checkpoint while giving colocatedVLLMSamplerhigher VRAM headroom (up to0.75vs0.45). Addedclient.open_sampler(...)/SamplingClientacross Python, TypeScript, Go, and Rust.Mutable checkpoint TTL & metadata (
PATCH /v1/checkpoints/{id}, all 4 SDKs, CLI): updates an active checkpoint'sttl_s(300..7776000s from now, ornullfor permanent) and/or replacement usermetadatawhile preserving internal manifest keys; returns404 checkpoint_not_foundor410 checkpoint_expired. Exposed viacheckpoints.update(...)in all 4 SDKs andgrad checkpoints update <id> [--ttl-s <secs> | --permanent] [--metadata <json>].console_urldeep-links & sampled-token usage accounting (migration0021, all 4 SDKs, CLI, Web UI): optionalGRAD_CONSOLE_URLaddsconsole_urlonTrainer,Run,EvalRun, andCheckpoint(/trainers/{id},/runs/{id},/evals/{id},/artifacts?checkpoint={id}), displayed in CLI detail views and copyable in the Web Console. Sample ops reportprompt_tokensandsampled_tokensonTrainerOp.usage,Trainer.usage,GET /v1/usage, andGET /v1/usage/summary(sampled_tokensbreakdown alongsidetokens).Interactive Checkpoint Chat Playground, Checkpoint TTL/Metadata Editor & Phase 9 Web Console (
server/ui): added/playgroundfor chatting with unexpired checkpoints, promotedpeft_loraartifacts, or catalog LLMs (including eval-only models) viamode: "sample"trainer sessions with side-by-side A/B compare, optional image (PNG/JPEG/WebP ≤ 5 MiB) and WAV audio (≤ 10 MiB) attachments, collapsible<think>blocks, and an interactive per-token logprob & top-5 alternative inspector. Added inlinePATCH /v1/checkpoints/{id}TTL/metadata editing (presets, custom seconds, permanentttl_s: null, 16 KiB JSON validation,410 checkpoint_expiredhandling),?checkpoint=<id>highlighting on/artifacts, "Chat in Playground" deep-links,mode/entropy/clip_fraction/sampled_tokensdisplays across Trainers and Usage, andMATH-500/IFEvalbenchmark & validator badges across Evals and Datasets.CLI diagnostics, credential hygiene & DevEx (
grad doctor,grad completions,grad local up): addedgrad doctor [--json](checks config/credentials0600permissions,/health/readylatency &/v1/modelsauth + multimodal count, Docker/Compose & local stack status, disk//dev/shm/GPU hardware, and Python SDK version parity), addedgrad completionsas an alias forgrad completion, tightened config directory permissions to0700on save with permissive-file warnings ingrad config showandgrad doctor, redactedapi_keyin CLIGlobalDebugoutput, added actionable CLI error hints for connection failures,401,410 checkpoint_expired,422 uncalibrated_model,422 unsupported_modality,422 sample_only_trainer, and422 recipe_not_supported_for_model, and surfaced the/playgroundURL andgrad doctorquickstart ingrad local up/grad local status.Environments run, on your machine (Python).
env.rollout_groups(policy, tasks, group_size=8)andenv.iter_rollout_groups(...)(groups as they finish) run multi-turn rollouts of anEnvironmentorToolsEnvironment(sync orasync def;setup=gives tools per-rolloutstate) against a policy: aTrainer(snapshot, sample, release), atrainer.snapshot(), orpolicies.OpenAI(model, base_url=). Each rollout runs on its own thread;timeout_scounts environment time only, and a timeout or an environment error is a typederror/timeoutoutcome, dropped from training and reported (grad.rollout_metrics:timeout_rate,error_rate,parse_fail_rate,reset_rate,truncation_rate). Teardown always runs; abandoned hung calls count againstmax_concurrency(EnvironmentHungwhen they hold every slot). ATrajectorycarries its exact tokensegments(TokenSegment) and runtime fields thatto_record()drops;Datum.from_trajectory,grad.with_advantages(groups, advantages.GroupStd(min_std=) | GroupMean() | RLOO(), skip_zero_var=1e-6, kl=grad.KL(trainer, coef=, weights="base", discount=0.0))->Batch(with its sampling temperature and, whenkl=is passed, zero-centered KL-to-reference advantage shaping via onetrainer.forward(..., weights=..., temperature=...)call pluskl_policy_ref/kl_policy_ref_v2inbatch.metrics),grad.recompute_logprobs,grad.mean_reward.grad.GroupScorer(fn, name=None, weight=1.0)(sync orasync def,(trajectories,)or(task, trajectories)) scores a task's non-error rollout group together insideRubric([...])acrossrollout_groups,iter_rollout_groups, andevals.create(env=...). The reward isgrad.combine(rubric, scores), the server'scombineScoresexactly. Removed:StepOutcomeandTrajectory.append_env_tokens(0.1 stubs);StatefulScorernow serialises as a local code item.On-Policy Distillation (OPD), Prompt Distillation & Self-Distillation (SDFT) (Python,
grad.distillation): addedTeacherScorerprotocol withTrainerTeacher(zero extra GPU memory withweights="base"|"initial"|"snapshot:<seq>"or a separate teacherTrainer),SnapshotTeacher(prompt_logprobs=True), andOpenAITeacher(/v1/completionsecho=True, max_tokens=0, logprobs=1);distillation_advantages/distillation_advantages_async(reverse_kl,forward_kl,jsd,clip_kl,discount,reward_weightblending, andteacher_tokens_fn/teacher_messages_fnprefix alignment across single- and multi-turn trajectories); and turnkeyOnPolicyDistiller,PromptDistiller, andSelfDistillerwrappers.Zero-dependency MCP tool binding (
grad.mcp, Python): added JSON-RPC 2.0MCP.stdio(...)(thread-safe subprocess transport with stderr draining and cleanterminate→killshutdown) andMCP.http(...)(Streamable HTTP withMcp-Session-Idnegotiation and JSON + SSE response parsing), withallow,deny,prefix,max_output_chars, structured error containment, and directToolsEnvironment(mcp=...)integration for rollouts and agent evals.Context compaction (
grad.compaction, Python): addedContextCompactor(truncate_tools,sliding_window, andsummarizestrategies with calibrated or custom token counting) wired intoEnvironment(..., compaction=...)andToolsEnvironment(..., compaction=...), cleanly opening a new token-alignedTokenSegment(incrementingcompactionsandresets) whenever compaction triggers mid-rollout.Curated, CI-tested runnable cookbook (
examples/): addedexamples/README.mdand 8 runnable recipes (rl_math.py,rl_tools_calculator.py,rl_mcp_agent.py,on_policy_distillation.py,preference_dpo.py,proxy_coding_agent.py,vlm_multimodal.py,rl_numerics_check.py), each supporting offline--dry-runsmoke verification in CI.External harness proxy & ecosystem integrations (Python):
- Live Snapshot OpenAI + Anthropic capturing proxy (
grad.proxy.SnapshotProxy):with snap.proxy() as p:(andtrainer.proxy(), pluspython -m grad.cli proxy --trainer <id> [--snapshot <seq>]) runs a stdlib loopback HTTP server exposingGET /v1/models,POST /v1/chat/completions(OpenAI JSON + SSE), andPOST /v1/messages(Anthropic JSON + SSE withsystem,thinking,tool_use, andtool_resulttranslation) atp.openai_urlandp.anthropic_url. Automatically detects multi-turn message extensions perX-Grad-Session/X-Session-Idheader, sendscontinueprompts tosnap.sample(...), and captures token-alignedTrajectoryobjects (p.trajectories(),p.reset_trajectories()) ready forDatum.from_trajectory/with_advantages/PPO. inspect-aimodel provider (grad.integrations.inspect_ai, extragrad-sdk[inspect]):GradInspectModel,grad_model(...), and@modelapi(name="grad")registration runinspect evalagainst a liveSnapshot,Trainer, or OpenAI-compatiblegradendpoint without adding required dependencies.verifiersv1 environment adapter (grad.integrations.verifiers, extragrad-sdk[verifiers]):from_verifiers(vf_env)wrapsverifiers.v1environments as nativegrad.Environmentinstances compatible withrollout_groups,with_advantages,PPO, andclient.evals.create(env=...), automatically exposing group-levelscore_groupmethods and plural-argument group rubric functions asgrad.GroupScoreritems onenv.rubric(andenv.group_scorer()). Addedrun_verifiers_via_proxy(...),VerifiersProxyRunner, andVerifiersEnvironment.run_via_proxy(...)to run customvf_env.rollout()/a_rollout()loops through a loopbackSnapshotProxy(usingopenai.AsyncOpenAI/openai.OpenAIwhen installed or a zero-dependencyhttpxOpenAI-compatible shim otherwise) with automaticcontinuetoken alignment and full per-rollout + group rubric scoring. Replaced the rigid<0.5.0hard crash with a forward-compatible structuralverifiers.v1guard (hard-rejecting legacy<0.4.0and missing/incompatibleverifiers.v1, warning and proceeding on>=0.5.0whenverifiers.v1is compatible).
- Live Snapshot OpenAI + Anthropic capturing proxy (
Trainer phase 2 across all four SDKs (Python, TypeScript, Go, Rust):
losses.ImportanceSampling,losses.PPO(clip_low, clip_high),Datumsampling_logprobs/advantages,temperatureonforward/forward_backward,forward(weights="snapshot:<seq>"),trainer.snapshot()(Snapshotwithsampleon the sample lane usingrequest_keyanddeadline_s, andrelease),trainer.snapshots(),{"continue": {...}}prompts,Sample.message/parsed,SampledPrompt.reset, andops/waitfolded into each SDK's poller. Pythonforward_backward(batch)also reportsstaleness_mean/staleness_max(optimizer steps between each rollout's snapshot and the call).Agent evals (
mode: "env") and regression gates: run multi-turnEnvironment/ToolsEnvironmentevals on your own machine or CI (client.evals.create(env=..., models=[policies.OpenAI(...), trainer, snap], gate=grad.Gate(max_drop=0.02)),client.evals.resume(...), andgrad eval --env module:attr). Rollouts and local scorers/validators run in your process, trajectories and scores post in batches (POST /v1/evals/{id}/outputs+/complete), optionalJudgeitems run on the eval worker over the posted trajectories, andgradaggregates with the same confidence intervals, pass@k and paired bootstrap. Gates (rule="significant"default withmax_drop=0.0, or"delta", againstbaselineorbaseline_eval) work on both agent and single-turn evals:grad evalexits8on regression (eval_regressed) and9when rollout errors exceed--max-error-rate(eval_error_rate), writes$GITHUB_STEP_SUMMARY, and resumes automatically on re-run viaIdempotency-Key=$GITHUB_RUN_ID. See docs/ENVIRONMENTS.md andexamples/workflows/agent-eval.yml.Departure (
samplelogprobs at sampling temperature):samplenow returns log-probs under the sampling distribution (log_softmax(softcap(logits) / temperature)renormalised overtop_p), matchingforward(..., temperature=...)attop_p=1for exact importance ratios, rather than rawtemperature=1log-probs.Multi-turn rollouts on trainers: a
continuesample prompt ({continue: {tokens, messages, ...}}) extends a trajectory with exactly the tokens a deployment would render after it (text-equality rule;resetwhen the template rewrote history), clampsmax_tokensto the room left (finish_reason: context_fullwith none), and every sample carriesmessage(reasoning and OpenAI-style tool calls, parsed per template family from the tokens with special tokens kept) andparsed. Gemma 4's<turn|>and<|tool_response>are always stop ids.Snapshots, sample lane, and dual-lane worker scheduling:
POST /v1/trainers/{id}/snapshotfreezes an adapter copy byseq(max_snapshots,409 too_many_snapshots, no eviction,snapshot_ttl_sidle release).POST /v1/trainers/{id}/snapshots/{seq}/sampleruns on the sample lane withrequest_keyidempotency, 1024 queue cap (429 Retry-After: 1), deadline sweeps (expired samples never unpark), andPOST /v1/trainers/{id}/ops/wait. The worker alternates train ops and just-in-time batched sample claims (grouped by snapshot and generation config; seeded ops run alone), preserves live snapshots across park and drain, reports per-lanecompute_msandutilization {train_s, sample_s, ready_s}, renders chats off the GPU critical path in the prefetch thread (TokenizerRenderer), and isolates HTTP 413 result errors toresult_too_largeon the single op.Agent evals (
mode: env), judges over trajectories, and regression gates:POST /v1/evalswithenv: {name, max_turns, fingerprint?}starts inawaiting_outputs(unclaimed, 24 h sweep). Clients post rollout outputs and trajectories toPOST /v1/evals/{id}/outputs(≤ 16 KiB inline, larger in S3 via presignedtrajectory_url;cost_usd: 0on the server), resume viaGET /v1/evals/{id}/outputs?fields=key, and finish withPOST /v1/evals/{id}/complete. Rubrics with judge items queue for the eval worker to score stored trajectories using a canonical 16 KiB capped transcript (preserving the final assistant turn) and bill judge tokens throughbillAttempt.baseline_evalpairing (422 baseline_mismatchon dataset, version, rubric, fingerprint, samples, max_turns or temperature mismatch) andgate {max_drop, rule: significant|delta}(minimum 30 paired tasks, reportingpaired_tasksandmin_detectable_drop) work for both single-turn and env evals. Shared golden reward fixturetests/fixtures/wire/combine-scores.jsonpins exacttoFixed(4)half-up parity between TypeScript and Python.Web console for Trainer phase 2 and Agent Evals (
server/ui): Evals now showawaiting_outputsstatus, environment metadata (env.name,max_turns,fingerprint),baseline_evallinks and deltas, regression gate banners (passed,regressed,rule,max_drop,paired_tasks,min_detectable_drop), and a paginated Outputs panel with an expandable trajectory viewer (inline or lazily fetched from S3trajectory_urlwith formatted tool calls/responses, reasoning toggle, finish reason, and error banners). Trainers now show GPU utilization ((train_s + sample_s) / ready_s), sample queue depth,closingstate, a Snapshots panel with confirmed release (DELETE /v1/trainers/{id}/snapshots/{seq}), and op lane /snapshot_seq/compute_mscolumns.One engine for recipes and trainers (
grad_trainer/engine.py): SFTRecipe's forward, backward and optimizer steps moved onto it, and a parity test checks a hand-written loop gives SFTRecipe's losses.Fixed: batched generation on CUDA attended padding. A model loaded for packed (varlen) training generated left-padded batches without an attention mask, so distillation's student samples for short prompts saw the padding. Generation now switches to padded SDPA.
0.2.0-alpha.9#
New training bases (the current Qwen range and Gemma 4, GPU-tested) and strict request bodies. No database migration since alpha.8. Before upgrading, note:
Breaking (API): every public request body refuses an unknown field with 422
unknown_field(worker endpoints don't), and the CLI refuses unknown keys in run,splitand--rubricfiles.Breaking (evals): a dataset whose
metadata.rubricdoesn't parse answers 422 instead of scoring withnon_empty.New trainable bases (SFT and DPO with LoRA, one 80 GB GPU): Qwen3.5 0.8B, 2B, 4B and 9B, Qwen3.8-27B, Qwen3.6-35B-A3B, and Gemma 4 E2B, E4B, 12B and 26B-A4B; Gemma-4-31B is eval-only (it peaks at 73.5 GiB training). Every one trained end to end on an H100 and its adapter loaded and generated in PEFT and vLLM 0.34. The checkpoints are multimodal; only the language model is trained, so adapters load on the published checkpoints. Five new chat templates render byte for byte like the official ones in both the trainer and the render preview (80 shared cases). Qwen3.5+ trains one example per row (their linear-attention layers carry state, so packing would leak between examples); Gemma 4 keeps its per-layer sliding windows and logit soft cap. The GPU image adds
fla-core(Qwen3.5-4B: 3,459 to 7,039 tokens/s; its kernels compile on a node's first run and are cached in the model cache). Importing your own LoRA for these bases is still refused. Prices for them are placeholders on the Qwen3 size curve.Plans refuse runs needing more than 79 GB of GPU memory (an "80 GB" H100 reports 79.6 GB to a claim, so such a run used to queue forever): 422
model_exceeds_gpu_memory.Metrics: a deliberate 501 (
keys_managed_by_cloud,inference_unavailable, secret writes withoutGRAD_SECRETS_KEY) is counted asstatus_class="501"and logged atinfo, soGradApiErrorRateHighand the 5xx panels count only real server faults.CLI:
grad runs inspectnumbers attempts from 1, like the events and the console;grad train --settakesPARENT.FIELDfor any nested recipe field (--set adapter.merge_on_export=true), checked against the recipe schema, and a bare nested name suggests its parent.Dev dependencies: vitest 4.1.12 (GHSA fixes in
@vitest/mocker; nothing shipped used it).Breaking (API): request bodies are strict. Every public request body refuses a field it doesn't declare with 422
unknown_fieldinstead of dropping it: run and eval plan/create (the recipe and everything nested in it), dataset create, push, render, filter and score, imports, uploads, sources, secrets, keys, artifact imports, resume and promote. A typo such as a run file'sadapter: {merge_on_exprot: true}used to train with the default; now the detail names the JSON path and the field it most likely meant:recipe.adapter.merge_on_exprot: unknown field (did you mean 'merge_on_export'?)(a nested field set one level too high,recipe.merge_on_export, suggestsadapter.merge_on_export). Free-form maps stay free-form (metadata,pricing, score maps, record contents); sourcefiltersare still checked per provider and an unknown one now gets the same hint. Worker endpoints (/v1/trainer-jobs/*) still ignore unknown fields, so workers and servers can roll out in either order. The spec marks these schemasadditionalProperties: false. The CLI, whose typed requests used to drop such a key before sending, refuses it in run files,splitand--rubricfiles with the same hint (unknown recipe field 'adapter.merge_on_exprot' (did you mean ...)).Python SDK:
sources.update(sample_rate=None)(orversion_interval=None,filters=None) sent a JSONnullthe server refuses (422);Nonenow keeps those values, like leaving them out.Nonestill clears the schedule and the record caps.CLI:
grad runs exportof an embedding run wroteadapter: {kind: encoder_full}, whichgrad train -frefused (422); the export leaves it out. A shared fixture now exports every recipe kind's resolved config and re-plans it to the same config.Evals: an eval on a dataset whose
metadata.rubricisn't a list of rubric items used to score withnon_emptywithout a word; it now answers 422validation_errornaming the bad field (Dataset 'x' has a metadata.rubric that isn't ...: metadata.rubric.0.validatr: unknown field ...). An eval that passes its ownrubricis unaffected.Render preview (
POST /v1/datasets/{name}/render,grad render, the console): token counts use the base's catalogchars_per_token, as run plans do, instead of 4 for every base. The Qwen3.5/3.6/3.8 and Gemma 4 bases (4.5) used to read about 12% higher in a render than in the plan.
0.2.0-alpha.8#
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}/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 andResumeand the Rust SDK's lists andcreatecalls take options structs (details below).Breaking (workers):
/completewith a status the job's kind doesn't support answers 422unsupported_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 fromSourceOptions::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]readGET /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 IDshows 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 topath=".", so the defaultformat="peft"could not work, and withoverwrite=Trueit deleted the working tree before failing; Rust andgrad 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.jsonagainstmanifest.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 byqlike 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 generatedlistRunMetricsStream/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 readMetricPoint | 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/artifactstakeq. 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=)andartifacts.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 theirlist_alltake the filter. The CLI hasgrad runs list --status failed,cancelled --search sft,grad eval list --status,grad imports list --status --dataset, and--searchongrad 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 (an
AbortSignalstill 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, andDownload(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 asdownload(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) andgrad 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_metricsandwait_with_metrics: useruns().events(id, true)and matchRunEvent::Metric, orwait_with_events.
0.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'stokens_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 an
event_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 403pin_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 on
grad_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 with
deadlock 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 (sograd ... | 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 with
LANGunset reportsen-US@posix); it falls back to en-US. The Datasets empty state points atgrad import FILE --dataset NAME(it namedgrad datasets import, which only takes Hugging Face datasets), and the Health page says evals run on eval workers.
0.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 takestrainjobs (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 the409 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).
0.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: setGRAD_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 outsideGRAD_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(GradApiErrorRateHighwascritical), 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's
head_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's
exp. 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 servestest/tiny-qwen3,test/tiny-qwen3-teacher, LoRA and merged artifacts trained on them, andtest/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, andgrad 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 sets
GRAD_WORKER_AUTOSCALINGfromkeda.enabled. - Releases: a registry that rejects an upload no longer holds back the GitHub Release and
Homebrew, and a pushed
v*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 anderror_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, andGradNoWorkersForQueuedJobsfor 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") unlessGRAD_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 answers
503 billing_unavailable, not422 unknown_model, and a heartbeat checks one balance per workspace at a time.
0.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-nartifact to download, evaluate or continue training from. Every SDK hasartifacts.uploadand 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_TOKENorGRAD_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 most
GRAD_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 carryqueue_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|kindgroups 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_unsupportedorsource_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, andgrad 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, andgrad local upaddsgrad-eval-worker). Restarting the API no longer interrupts an eval. Breaking (operators):GRAD_INFERENCE_API_KEY,GRAD_JUDGE_API_KEYandEVAL_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 upruns 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 aUsageQuery. - Breaking (Cloud operators only):
CLOUD_INTERNAL_API_URL's/auth/verifyandbilling/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.planaddscost_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
answers
503 database_unavailableand the pool drops the dead connection. - Concurrent identical pushes and promotes no longer make duplicate versions or releases
(migration 0002), and
record_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 is bound to its orchestrator and host as well as its lease id, and a replayed
/completeanswers only the credential that closed the attempt (others get409 lease_lost). - Train and eval dataset streams are served only to the credential holding the job's lease.
0.2.0-alpha.3#
Changed
- npm publishes with trusted publishing (OIDC); this is the first crates.io release of
grad-sdkandgrad-cli. The Go module tag step accepts a tag pushed by hand. - The images are published to Docker Hub as
docker.io/gradiated/grad-serveranddocker.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.
0.2.0-alpha.2#
Security
- The trainer image installs from hash-pinned locks resolved from PyPI only (CPU torch is
pinned to its one wheel on the PyTorch index), with
pip install --require-hashes. - Source syncs have wall-clock limits: 120 s per provider response however slowly a host
sends it, and
GRAD_SOURCES_SYNC_MAX_SECONDS(default 3600) per sync. - Recipe
loggers=(W&B, MLflow) go through the source egress guard: https only, no private or metadata addresses unlessGRAD_SOURCES_EGRESS_ALLOWlists them, every redirect hop re-checked and the tracker key never sent to another origin. - The egress guard judges the IPv4 address inside NAT64 (
64:ff9b::/96) and IPv4-compatible IPv6 addresses, so64:ff9b::a9fe:a9fecan't reach a metadata endpoint. - Worker errors shown on runs and imports no longer quote presigned URL query strings or object-storage response bodies.
- Hugging Face imports accept only Hub ids (no
./..segments, never a path that exists on the worker) and use the workspace's token or none, never the worker's own Hugging Face login. - A job's model id can't name a directory outside
GRAD_MODELS_MIRROR. - The Python SDK names a downloaded bundle from the artifact's base name only, like the TypeScript and Go SDKs.
AUTH_MODE=nonerefuses a non-loopbackHOSTunlessAUTH_MODE_NONE_ALLOW_REMOTE=true(server/docker-compose.ymlsets it; its port is published on loopback only).- A regex rubric item that times out runs at most once per eval; the eval's other outputs score it 0 without queueing behind it on the replica's shared regex worker.
- One API key can hold at most 20 run event or metric streams open per replica (429
too_many_streams).
Changed
The Rust SDK is imported as
grad(use grad::Client); it is still published asgrad-sdkon crates.io, wheregradis taken.The eval endpoint settings are
GRAD_INFERENCE_BASE_URL,GRAD_INFERENCE_API_KEY,GRAD_JUDGE_BASE_URLandGRAD_JUDGE_API_KEYeverywhere (server, compose, Helm, docs). The unprefixedINFERENCE_*/JUDGE_*names still work and log a deprecation warning.A run stopped because the workspace ran out of balance (Cloud) is
stopped_balance;stopped_budgetmeans the run's own cap and resumes only with a higher one.
Fixed
grad local upandgrad local resetonly ever write thelocalprofile. They used to overwrite whichever profile--profileorGRADIATED_PROFILEselected, and now refuse when that profile (orlocalitself) points at a server that isn't on this machine.grad runs inspect --yamlround-trips: zero values (warmup: 0) are kept, a continued-training run names its starting artifact asmodel, andoptimizer,eval_everyandloggersare exported, sograd train -fplans the same config.- The train/eval split holds out a group whenever the dataset has two or more: small
datasets no longer train with an empty eval side (which also made reward-model runs fall
back to
eval_loss).
0.2.0-alpha.1#
First public release.
Added
grad-server: datasets, runs, checkpoints, artifacts, evals and API keys on PostgreSQL and S3-compatible storage, described by one OpenAPI 3.1 contract (spec/openapi.yaml).grad-trainer: eight recipes (SFT, DPO, router, decision model, cartridge, embedding, distillation and reward model) with calibrated defaults, cost plans before compute, hard spend caps, checkpoints and resume.- SDKs for Python (
grad-sdk), TypeScript (@gradiated/grad), Go (github.com/Gradiated/grad/sdks/go) and Rust (grad-sdk), with transports generated from the spec. - The
gradCLI, includinggrad local upfor a local stack. - Public container images on GHCR (
grad-server,grad-trainer,grad-trainer:*-gpu), published asmainandsha-<7>on every push tomainand asX.Y.Z/lateston release.grad local uppulls its own version (ormainfrom a source build);--image-tagpicks another. - A Helm chart with KEDA scale-to-zero for GPU trainers and air-gapped overrides.
Changed
gradis now licensed under MIT (it was Apache-2.0). Every package's license metadata saysMIT.