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 status is pending, active or failing (breaking). untested becomes pending, and ok becomes active. 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_INTEGRATIONS and the boot-time move of grad's own integrations are gone. On Cloud, grad ignores rows in its grad_integrations table and logs N local integrations are ignored in Cloud mode once at boot. Without CLOUD_INTERNAL_API_URL and CLOUD_SERVICE_TOKEN, integrations answer 503 integrations_unavailable.

  • allowed_hosts is gone from the Cloud contract, in records, creates and patches. A credential only ever goes to its integration's host. 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@latest too) and grad checkpoints view CKPT. Each resolves its reference like the group's get and opens the resource's page.
    • On Gradiated Cloud these open exactly the resource's console_url from 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-open prints the URL; --json returns {url, mode, opened}.
    • Breaking (CLI): grad ui takes no run or trainer id any more. It opens the runs page (/runs, on the console on Cloud); grad ui RUN exits 2 and names the view command to use.
    • Resource groups answer to their singular: grad run, dataset, artifact, checkpoint, model, env, key, integration and source (grad eval view works too).
    • Dataset and Artifact (get and list) gain console_url, and GET /v1/whoami returns console_url (the console's runs page), when GRAD_CONSOLE_URL is set. Every console path now comes from one server helper (consolePath in server/api/src/deps.ts). Helm sets GRAD_CONSOLE_URL from cloud.consoleUrl.

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_INTEGRATIONS is 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 version they were based on. A change in between is 409 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.

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 (Langfuse public_key + secret_key, never PK:SK), a server-derived host binding, a connection status (ok, failing, untested) and used_by. Deleting one in use is 409 integration_in_use with used_by.
    • Sources, Hugging Face dataset and artifact imports, and W&B/MLflow loggers take integration instead of secret; it may be left out when the workspace has exactly one integration of that provider (422 integration_ambiguous lists several). Source providers and loggers lose host, secret and tracking_uri (they live on the integration). Rotating an integration's credentials resumes its paused sources.
    • Removed /v1/secrets, grad secrets, the SDKs' secrets resources (SecretRef, SecretLike, secretName) and allowed_hosts. The secrets:read/secrets:write scopes are now integrations:read/integrations:write.
    • CLI: grad integrations add|list|get|test|update|rm (hidden prompts, stdin or --from-env with each provider's own variables; add tests the connection) and grad 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.

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) and qwen/qwen3-8b (lr=3e-4) for RouterRecipe in the model catalog.
    • Preserved shared multi-turn session_id across RouterRecipe by_session splits in both the API planner and trainer (falling back to group_id only when session_id is absent or inconsistent within a prompt group), preventing cross-split session leakage.
    • Hardened RouterPolicy.route() / evaluate() to reject NaN/Inf/bool candidate probabilities and distinguish explicit lambda_=None/threshold=None from omitted defaults via a sentinel.
    • Added typed EvalReport & RouterParetoSummary router fields, improved run_byo_eval (session_id, score_name, pricing, error_samples), and surfaced clearer router skip reasons when records lack numeric scores.
  • Trainer Endpoints, Losses & Billing (server/api, server/trainer, Python SDK):
    • Fixed POST /v1/trainers/:id/endpoint-tokens to honor validated x-forwarded-proto / x-forwarded-host headers behind TLS-terminating ingress (with HTTPS preservation in the Python SDK), preventing ConnectTimeout on Cloud trainer endpoints.
    • Automatically resynced next_seq in Python Trainer after unpinned trainer.endpoint() traffic to prevent 409 seq_conflict on subsequent ops.
    • Fixed GRPOKL.stats / SFTKL.stats entropy kwarg handling in grad_trainer/losses.py, exposed Trainer.cost_usd & Trainer.tokens_processed, and added backward-compatible datasets.push() fallback + /v1/whoami bare-404 handling.
  • SDK Ergonomics & Breaking DX Cleanups (Python & TypeScript SDKs):
    • Breaking: Changed Dataset.records() / Datasets.records() so limit caps the total yielded records (adding page_size for server pagination control) and yields AttrDict records supporting both r["messages"] and r.messages.
    • Breaking: Changed Trainer.log_metrics(metrics, *, step=None, timestamp=None) (Python) and Trainer.logMetrics(metrics, { step?, timestamp? }) (TypeScript) to metrics-first with step defaulting to the trainer's current step.
    • Added SaveStateResult.id / .checkpoint_id / .step, SampleResult.text / .texts, AttrDict conversion for Sample.message, thinking= forwarding on sample() and sample_stream(), and disabled APIObject sequence fallback (__iter__ = None) so accidental iteration raises TypeError instead of KeyError: 0.

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 grpo recipe across API, planner, trainer (GRPOKL with single-GPU initial-weight KL regularization and built-in deterministic validators math, exact_match, contains, final_number, choice, json, non_empty, regex), OpenAPI, all four SDKs (GRPORecipe), and CLI (grad train --recipe grpo --validator ..., supporting group_std, dr_grpo, rloo, and Clip-Higher clip_low/clip_high).
    • Promoted additional server losses (CISPO, DRO, StableReinforce with bounded k3 KL guard) and added Trainer.train_step / trainStep, true token-level Shannon entropy in RL forward_backward, Trainer.wait_ready(), and accurate recipe_kind stamping on trainer exports.
  • 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 thin endpoint() / trajectories() helpers across Python, TypeScript, Go, and Rust SDKs (removing the local Python proxy.py HTTP server while keeping grad proxy in Rust untouched for local BYO rollouts).
    • Fixed server SSE done stream-drain races, immediate template_revision population on POST /v1/trainers, Go SampleStream.Deltas SSE error propagation, and Qwen3 multi-turn continue prefix reuse (reset=False).
  • Router Cost-Aware Calibration & Planning Diagnostics:
    • Upgraded RouterRecipe to cost-aware utility routing (argmax_m (p_m - λ c_m) with per-candidate temperatures and threshold fallback), rich eval_report diagnostics (selection_eval_loss vs heldout_eval_loss, candidate_breakdown, baselines, pareto_curve, truncation_stats), zero-dependency RouterPolicy in Python & TypeScript, and runs.plan router_summary.
  • 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.json writes.
    • Fixed Rust S3 presigned PUT 403 SignatureDoesNotMatch (stopped injecting unsigned content-type) and separated storage upload errors from Grad API scope hints.
    • Added atomic multi-chunk datasets.push() via upload_id, DELETE /v1/datasets/{name} (grad datasets delete) with empty v0 cleanup on failed initial imports, expanded HF column mapping, shared conversation prefix stripping for DPO/reward pairs with explicit prompt, preserved per-message train and name in import_file, cleaned up expected_output semantics (never overwriting existing assistant CoT turns or hijacking DPO/reward), upfront DecisionModelRecipe schema validation, and six MathEquivalence / IFEval validator fixes.
  • Unified CLI, Portal UI, Evals & SDK Polish:
    • Unified grad runs list/get/watch/cancel across managed runs and interactive trainers (trn_* auto-dispatch), unified grad usage list --run trn_*, updated Paused ($0/hr) copy, workflow-ordered server/ui nav + Settings page, and added GET /v1/whoami + grad whoami + Cloud-safe 501 inference_unavailable errors.
    • 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" eval by_scorer/mean_turns, TypeScript SampledAssistantMessage → ChatMessage assignability + reasoningContent codec, Go UsageTrainer, and grad render multi-line TRAIN │ gutters + --preserve-thinking.

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, and to_sft_records / to_dpo_pairs / to_grpo_groups.
    • TypeScript SDK: zero-dependency createRolloutProxy, startRollout, runByoEval, fromBraintrustScorer, fromLangSmithFeedback, toSftRecords, and toDpoPairs.
    • CLI: pure-Rust grad proxy loopback OpenAI + Anthropic proxy with BYOK pass-through (secret-redacted), Gradiated model routing, --system-prompt-file, and grad.trajectory/1 JSONL capture.
  • Local Docker Sandboxes, Harbor & /v1/environments Registry:
    • SandboxProvider / DockerProvider / DockerSandbox, SandboxEnvironment, HarnessEnvironment, and HarborEnvironment for local Docker execution alongside /v1/environments registry 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 grad UI and docs to the simplified geometric GRAD wordmark, polished runs and run-detail views, added the Trainers observability tab and Environments view, and expanded Storybook.
  • 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 watch live TUI, trainer metrics & step tracking, GPU batching for seeded and mode=sample ops, Redis-backed ephemeral state & op-stream pub/sub, EmbeddingRecipe overhaul, live SnapshotProxy streaming, local zero-dep validators, and standardized CLI/SDK verbs across all four SDKs.

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_id is nullable (a trainer's checkpoints have trainer_id), and ArtifactProvenance has trainer_id and the source value trainer.

  • 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 both artifacts:read and legacy artifacts:pin JWT scopes for zero-downtime rolling upgrades; Postgres tables remain expand-only (no destructive DROP 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 trainer jobs by default (GRAD_WORKER_KINDS now defaults to train,import,trainer; the Helm GPU pool's kinds are [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 with forward_backward (cross_entropy or linear; Python's losses.CustomLoss computes any loss of the log-probs in local torch and sends its gradient as a linear loss, with grad-sdk[torch]), forward (current, base or starting weights), optim_step (AdamW), sample, save_state, export (a peft_lora artifact) and render. Every op returns a future and carries a client-assigned seq, 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_usd is a hard cap checked before every op, and usage flows through the Cloud usage export as kind: trainer.

  • Trainer futures compose with async code. Python: await fut waits without blocking the event loop, and fut.future() is the op as a concurrent.futures.Future (as_completed, asyncio.wrap_future); one background long-poll per trainer serves every awaited op. TypeScript: an OpFuture is a PromiseLike, so await fut and Promise.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"]) to TrainableModel, 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 in grad models list.
    • Added strict API validation for OpenAI image_url (inline PNG/JPEG/WebP base64 data URIs ≤ 5 MiB; zero SSRF: rejects http(s):///file:// with 422 invalid_media_uri) and input_audio (RIFF/WAVE ≤ 10 MiB, rejected if non-WAV with 422 invalid_media), role gating (422 invalid_media_role), modality gating (422 unsupported_modality across SFT, non-SFT recipes, Trainer ops, and Evals), bounded per-datum/per-op limits (≤ 8 images, ≤ 4 audio clips, ≤ 20 MiB decoded media/op, 32 MiB trainer 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, zero torchvision) + pure-Python RIFF/WAVE & NumPy FFT 16 kHz resampler multimodal pipeline in grad_trainer (multimodal.py, templates.py, engine.py, session.py, recipes/sft.py, sampler.py, _vllm_worker.py) supporting Qwen3_5ForConditionalGeneration / Qwen3_5MoeForConditionalGeneration and Gemma4ForConditionalGeneration with zero regression on text-only varlen fast paths, /dev/shm sha256-deduped vLLM media IPC with auto-mode fallback to HFSampler, and processor saving on merged exports.
    • Added zero-extra-dependency multimodal helpers (image_part/audio_part/MediaItem/extract_media, plus Image/Audio in Python and *FromFile in TS/Go/Rust) and client-side SampledPrompt.media / TokenSegment.media propagation (Datum.from_sample, Datum.from_trajectory, SnapshotProxy) across Python, TypeScript, Go, and Rust SDKs.
  • RL losses on trainers: importance_sampling, ppo (clip_low, clip_high; recommended default for async/stale rollouts), cispo (clip_low, clip_high), and dro (beta, strictly masked by weights) read the datum fields sampling_logprobs and advantages with weights as the mask, and report kl_sample_train, kl_sample_train_v2, sample_train_max_diff, ratio_mean, ratio_max, and (ppo/cispo) clip_fraction. forward and forward_backward take temperature (the soft-capped logits divided by it, as the sampler does).

  • Calibrated lr="auto" on optim_step (all 4 SDKs): optim.AdamW(lr="auto", objective="sft"|"rl"|"dpo") resolves the model's calibrated LR server-side from catalog.ts (including calibrated rl LRs across trainable Qwen3/3.5/3.6/3.8 and Gemma 4 models), exposes Trainer.calibrated_lrs, returns the applied numeric lr on OptimStepResult, and refuses uncalibrated models/objectives with 422 uncalibrated_model.

  • top_k, top_logprobs, and prompt_logprobs on sample (both HFSampler and colocated VLLMSampler, all 4 SDKs): sample accepts top_k (1..1000), top_logprobs (0..20, returning per-token [{token_id, logprob}] sorted descending from the processed sampling distribution), and prompt_logprobs (bool, returning per-prompt-token float32 log-probs with index 0 = 0.0 matching forward()).

  • Checkpoint TTLs, save_state(metadata=...), and 410 checkpoint_expired (migration 0020, all 4 SDKs, CLI, Web UI): POST /v1/trainers accepts checkpoint_ttl_s (300..7776000 s) for automatic autosave/park checkpoints; save_state accepts optional ttl_s (300..7776000, omitted/null = permanent) and metadata (JSON object ≤ 16 KiB serialized UTF-8) returned on SaveStateResult.checkpoint.{expires_at, metadata}; final close checkpoints stay permanent; maintenance sweeps expired trainer checkpoint S3 blobs outside DB locks while keeping tombstone rows so resuming returns 410 checkpoint_expired.

  • Expanded built-in verified HF benchmarks (4 → 13) + math_equivalence and ifeval validators (all 4 SDKs, CLI): added pinned, public benchmarks arc_easy, hellaswag, winogrande, truthfulqa_mc1, boolq, openbookqa, commonsense_qa, math500 (HuggingFaceH4/MATH-500, 500 rows, scored with math_equivalence supporting nested \boxed{...}, fractions, radicals, \pi/trig, intervals/tuples/sets, symbolic probing, and numeric tolerance), and ifeval (google/IFEval, 541 rows, deterministic verifier for all 25 Google IFEval instruction IDs returning exact satisfied / total fraction).

  • StableReinforce RL loss + per-step entropy and clip_fraction diagnostics (all 4 SDKs): added stable_reinforce (clip_low=0.2, clip_high=0.28, kl_coef=0.0 with non-negative k3 KL penalty; Python grad.StableReinforce / losses.StableReinforce, TS losses.stableReinforce, Go grad.StableReinforce, Rust Loss::StableReinforce) and surfaced Monte-Carlo entropy (-mean(sampling_logprobs)) across all RL losses plus clip_fraction on clipped RL losses.

  • 32K Trainer context, Qwen3.5 vLLM default, true token-by-token sample streaming, content-addressed media uploads, and warm checkpoint/artifact hot-swap (migration 0022, all 4 SDKs):

    • Raised TRAINER_MAX_SEQ_LEN from 8192 → 32768 (min(model.max_context_tokens, 32768)), enabled "Qwen3_5ForConditionalGeneration" in DEFAULT_VLLM_ALLOW_ARCHS, and capped colocated VLLMSampler max_model_len safely to min(model_max_pos, 32768) (respecting GRAD_VLLM_MAX_MODEL_LEN).
    • Added token-by-token SSE streaming on sample (stream: true, GET /v1/trainers/{id}/ops/{op_id}/stream, worker POST /v1/trainer-jobs/{id}/ops/{op_id}/chunks, backed by Valkey/Redis Streams via optional REDIS_URL with XADD MAXLEN ~ 2000, 5 min TTL, and XREAD BLOCK, falling back to a bounded in-memory OpStreamBus when REDIS_URL is unset — zero Postgres chunk writes, never coalesced on the sample lane). Added valkey/valkey:8-alpine to Docker Compose and optional redis.url / redis.existingSecret / networkPolicy.redisEgress to the Helm chart. Added sample_stream / sampleStream / SampleStream across Python, TypeScript, Go, and Rust SDKs, and upgraded SnapshotProxy (OpenAI /v1/chat/completions and Anthropic /v1/messages) to stream live token deltas while preserving exact Trajectory and sampling_logprobs capture.
    • Added content-addressed, workspace-isolated media uploads (POST /v1/media accepting JSON or raw image/png, image/jpeg, image/webp, audio/wav, GET /v1/media/{id}) deduplicated by (workspace_id, sha256) in grad_media + S3, usable via grad://media/med_..., input_audio.media_id, or MediaItem.media_id with a bounded worker LRU MediaCache and client.media.upload / get helpers across all 4 SDKs.
    • Added instant checkpoint/artifact hot-swap on warm mode: "sample" sessions via weights: "checkpoint:<id>" | "artifact:<id>" | "base" | "initial" on sample, 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 external LoRARequest + 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}/stream with Authorization headers, 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 share base_model), content-addressed POST /v1/media attachment uploads (grad://media/<id> / media_id reuse across turns), and updated Phase 11 "Copy as Python" (sample_stream, weights, grad.Image.upload/grad.Audio.upload).
  • Opt-in LoRA Multimodal Projector Adaptation & Multimodal DPO / Off-Policy Distill / Reward Recipes (all 4 SDKs, CLI):

    • Added optional adapter.train_multimodal_projector (default false) on LoRA runs and trainers (grad.Lora(..., train_multimodal_projector=True), TS adapters.lora({ trainMultimodalProjector: true }), Go LoRA{TrainMultimodalProjector: true}, Rust AdapterSpec / TrainerOptions.train_multimodal_projector). Rejected synchronously with 422 unsupported_modality on 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 in adapter_config.json and trainer engine.json, and keeps GRAD_SAMPLER=auto safe by falling back to HFSampler (rejecting explicit GRAD_SAMPLER=vllm with RecipeConfigError).
    • Enabled multimodal (image and audio) datasets across DPORecipe (preference pairs preserving exact padded sdpa + position_ids=None policy & disabled-adapter reference log-probs), off-policy DistillRecipe, and RewardRecipe (pairwise & pointwise multimodal scoring with left-truncation media-token protection), plus calibrated distill/reward LRs on all trainable multimodal catalog models. On-policy distill, incompatible recipes (embedding, classifier, router, cartridge, decision), and text-only models continue to reject multimodal datasets with 422 unsupported_modality, and immutable dataset records/evals consistently reject Trainer-API-scoped grad://media/med_... / input_audio.media_id references synchronously with 422 invalid_media_uri.
  • Decoupled SamplingClient (mode: "sample" on Trainers, migration 0021, all 4 SDKs): POST /v1/trainers accepts mode: "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) with 422 sample_only_trainer, skipping optimizer/gradient buffers and parking without a checkpoint while giving colocated VLLMSampler higher VRAM headroom (up to 0.75 vs 0.45). Added client.open_sampler(...) / SamplingClient across Python, TypeScript, Go, and Rust.

  • Mutable checkpoint TTL & metadata (PATCH /v1/checkpoints/{id}, all 4 SDKs, CLI): updates an active checkpoint's ttl_s (300..7776000 s from now, or null for permanent) and/or replacement user metadata while preserving internal manifest keys; returns 404 checkpoint_not_found or 410 checkpoint_expired. Exposed via checkpoints.update(...) in all 4 SDKs and grad checkpoints update <id> [--ttl-s <secs> | --permanent] [--metadata <json>].

  • console_url deep-links & sampled-token usage accounting (migration 0021, all 4 SDKs, CLI, Web UI): optional GRAD_CONSOLE_URL adds console_url on Trainer, Run, EvalRun, and Checkpoint (/trainers/{id}, /runs/{id}, /evals/{id}, /artifacts?checkpoint={id}), displayed in CLI detail views and copyable in the Web Console. Sample ops report prompt_tokens and sampled_tokens on TrainerOp.usage, Trainer.usage, GET /v1/usage, and GET /v1/usage/summary (sampled_tokens breakdown alongside tokens).

  • Interactive Checkpoint Chat Playground, Checkpoint TTL/Metadata Editor & Phase 9 Web Console (server/ui): added /playground for chatting with unexpired checkpoints, promoted peft_lora artifacts, or catalog LLMs (including eval-only models) via mode: "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 inline PATCH /v1/checkpoints/{id} TTL/metadata editing (presets, custom seconds, permanent ttl_s: null, 16 KiB JSON validation, 410 checkpoint_expired handling), ?checkpoint=<id> highlighting on /artifacts, "Chat in Playground" deep-links, mode / entropy / clip_fraction / sampled_tokens displays across Trainers and Usage, and MATH-500 / IFEval benchmark & validator badges across Evals and Datasets.

  • CLI diagnostics, credential hygiene & DevEx (grad doctor, grad completions, grad local up): added grad doctor [--json] (checks config/credentials 0600 permissions, /health/ready latency & /v1/models auth + multimodal count, Docker/Compose & local stack status, disk//dev/shm/GPU hardware, and Python SDK version parity), added grad completions as an alias for grad completion, tightened config directory permissions to 0700 on save with permissive-file warnings in grad config show and grad doctor, redacted api_key in CLI Global Debug output, added actionable CLI error hints for connection failures, 401, 410 checkpoint_expired, 422 uncalibrated_model, 422 unsupported_modality, 422 sample_only_trainer, and 422 recipe_not_supported_for_model, and surfaced the /playground URL and grad doctor quickstart in grad local up / grad local status.

  • Environments run, on your machine (Python). env.rollout_groups(policy, tasks, group_size=8) and env.iter_rollout_groups(...) (groups as they finish) run multi-turn rollouts of an Environment or ToolsEnvironment (sync or async def; setup= gives tools per-rollout state) against a policy: a Trainer (snapshot, sample, release), a trainer.snapshot(), or policies.OpenAI(model, base_url=). Each rollout runs on its own thread; timeout_s counts environment time only, and a timeout or an environment error is a typed error/timeout outcome, 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 against max_concurrency (EnvironmentHung when they hold every slot). A Trajectory carries its exact token segments (TokenSegment) and runtime fields that to_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, when kl= is passed, zero-centered KL-to-reference advantage shaping via one trainer.forward(..., weights=..., temperature=...) call plus kl_policy_ref/kl_policy_ref_v2 in batch.metrics), grad.recompute_logprobs, grad.mean_reward. grad.GroupScorer(fn, name=None, weight=1.0) (sync or async def, (trajectories,) or (task, trajectories)) scores a task's non-error rollout group together inside Rubric([...]) across rollout_groups, iter_rollout_groups, and evals.create(env=...). The reward is grad.combine(rubric, scores), the server's combineScores exactly. Removed: StepOutcome and Trajectory.append_env_tokens (0.1 stubs); StatefulScorer now serialises as a local code item.

  • On-Policy Distillation (OPD), Prompt Distillation & Self-Distillation (SDFT) (Python, grad.distillation): added TeacherScorer protocol with TrainerTeacher (zero extra GPU memory with weights="base"|"initial"|"snapshot:<seq>" or a separate teacher Trainer), SnapshotTeacher (prompt_logprobs=True), and OpenAITeacher (/v1/completions echo=True, max_tokens=0, logprobs=1); distillation_advantages / distillation_advantages_async (reverse_kl, forward_kl, jsd, clip_kl, discount, reward_weight blending, and teacher_tokens_fn / teacher_messages_fn prefix alignment across single- and multi-turn trajectories); and turnkey OnPolicyDistiller, PromptDistiller, and SelfDistiller wrappers.

  • Zero-dependency MCP tool binding (grad.mcp, Python): added JSON-RPC 2.0 MCP.stdio(...) (thread-safe subprocess transport with stderr draining and clean terminate→kill shutdown) and MCP.http(...) (Streamable HTTP with Mcp-Session-Id negotiation and JSON + SSE response parsing), with allow, deny, prefix, max_output_chars, structured error containment, and direct ToolsEnvironment(mcp=...) integration for rollouts and agent evals.

  • Context compaction (grad.compaction, Python): added ContextCompactor (truncate_tools, sliding_window, and summarize strategies with calibrated or custom token counting) wired into Environment(..., compaction=...) and ToolsEnvironment(..., compaction=...), cleanly opening a new token-aligned TokenSegment (incrementing compactions and resets) whenever compaction triggers mid-rollout.

  • Curated, CI-tested runnable cookbook (examples/): added examples/README.md and 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-run smoke verification in CI.

  • External harness proxy & ecosystem integrations (Python):

    • Live Snapshot OpenAI + Anthropic capturing proxy (grad.proxy.SnapshotProxy): with snap.proxy() as p: (and trainer.proxy(), plus python -m grad.cli proxy --trainer <id> [--snapshot <seq>]) runs a stdlib loopback HTTP server exposing GET /v1/models, POST /v1/chat/completions (OpenAI JSON + SSE), and POST /v1/messages (Anthropic JSON + SSE with system, thinking, tool_use, and tool_result translation) at p.openai_url and p.anthropic_url. Automatically detects multi-turn message extensions per X-Grad-Session / X-Session-Id header, sends continue prompts to snap.sample(...), and captures token-aligned Trajectory objects (p.trajectories(), p.reset_trajectories()) ready for Datum.from_trajectory / with_advantages / PPO.
    • inspect-ai model provider (grad.integrations.inspect_ai, extra grad-sdk[inspect]): GradInspectModel, grad_model(...), and @modelapi(name="grad") registration run inspect eval against a live Snapshot, Trainer, or OpenAI-compatible grad endpoint without adding required dependencies.
    • verifiers v1 environment adapter (grad.integrations.verifiers, extra grad-sdk[verifiers]): from_verifiers(vf_env) wraps verifiers.v1 environments as native grad.Environment instances compatible with rollout_groups, with_advantages, PPO, and client.evals.create(env=...), automatically exposing group-level score_group methods and plural-argument group rubric functions as grad.GroupScorer items on env.rubric (and env.group_scorer()). Added run_verifiers_via_proxy(...), VerifiersProxyRunner, and VerifiersEnvironment.run_via_proxy(...) to run custom vf_env.rollout() / a_rollout() loops through a loopback SnapshotProxy (using openai.AsyncOpenAI/openai.OpenAI when installed or a zero-dependency httpx OpenAI-compatible shim otherwise) with automatic continue token alignment and full per-rollout + group rubric scoring. Replaced the rigid <0.5.0 hard crash with a forward-compatible structural verifiers.v1 guard (hard-rejecting legacy <0.4.0 and missing/incompatible verifiers.v1, warning and proceeding on >=0.5.0 when verifiers.v1 is compatible).
  • Trainer phase 2 across all four SDKs (Python, TypeScript, Go, Rust): losses.ImportanceSampling, losses.PPO(clip_low, clip_high), Datum sampling_logprobs/advantages, temperature on forward/forward_backward, forward(weights="snapshot:<seq>"), trainer.snapshot() (Snapshot with sample on the sample lane using request_key and deadline_s, and release), trainer.snapshots(), {"continue": {...}} prompts, Sample.message/parsed, SampledPrompt.reset, and ops/wait folded into each SDK's poller. Python forward_backward(batch) also reports staleness_mean/staleness_max (optimizer steps between each rollout's snapshot and the call).

  • Agent evals (mode: "env") and regression gates: run multi-turn Environment / ToolsEnvironment evals 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(...), and grad 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), optional Judge items run on the eval worker over the posted trajectories, and grad aggregates with the same confidence intervals, pass@k and paired bootstrap. Gates (rule="significant" default with max_drop=0.0, or "delta", against baseline or baseline_eval) work on both agent and single-turn evals: grad eval exits 8 on regression (eval_regressed) and 9 when rollout errors exceed --max-error-rate (eval_error_rate), writes $GITHUB_STEP_SUMMARY, and resumes automatically on re-run via Idempotency-Key=$GITHUB_RUN_ID. See docs/ENVIRONMENTS.md and examples/workflows/agent-eval.yml.

  • Departure (sample logprobs at sampling temperature): sample now returns log-probs under the sampling distribution (log_softmax(softcap(logits) / temperature) renormalised over top_p), matching forward(..., temperature=...) at top_p=1 for exact importance ratios, rather than raw temperature=1 log-probs.

  • Multi-turn rollouts on trainers: a continue sample prompt ({continue: {tokens, messages, ...}}) extends a trajectory with exactly the tokens a deployment would render after it (text-equality rule; reset when the template rewrote history), clamps max_tokens to the room left (finish_reason: context_full with none), and every sample carries message (reasoning and OpenAI-style tool calls, parsed per template family from the tokens with special tokens kept) and parsed. Gemma 4's <turn|> and <|tool_response> are always stop ids.

  • Snapshots, sample lane, and dual-lane worker scheduling: POST /v1/trainers/{id}/snapshot freezes an adapter copy by seq (max_snapshots, 409 too_many_snapshots, no eviction, snapshot_ttl_s idle release). POST /v1/trainers/{id}/snapshots/{seq}/sample runs on the sample lane with request_key idempotency, 1024 queue cap (429 Retry-After: 1), deadline sweeps (expired samples never unpark), and POST /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-lane compute_ms and utilization {train_s, sample_s, ready_s}, renders chats off the GPU critical path in the prefetch thread (TokenizerRenderer), and isolates HTTP 413 result errors to result_too_large on the single op.

  • Agent evals (mode: env), judges over trajectories, and regression gates: POST /v1/evals with env: {name, max_turns, fingerprint?} starts in awaiting_outputs (unclaimed, 24 h sweep). Clients post rollout outputs and trajectories to POST /v1/evals/{id}/outputs (≤ 16 KiB inline, larger in S3 via presigned trajectory_url; cost_usd: 0 on the server), resume via GET /v1/evals/{id}/outputs?fields=key, and finish with POST /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 through billAttempt. baseline_eval pairing (422 baseline_mismatch on dataset, version, rubric, fingerprint, samples, max_turns or temperature mismatch) and gate {max_drop, rule: significant|delta} (minimum 30 paired tasks, reporting paired_tasks and min_detectable_drop) work for both single-turn and env evals. Shared golden reward fixture tests/fixtures/wire/combine-scores.json pins exact toFixed(4) half-up parity between TypeScript and Python.

  • Web console for Trainer phase 2 and Agent Evals (server/ui): Evals now show awaiting_outputs status, environment metadata (env.name, max_turns, fingerprint), baseline_eval links 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 S3 trajectory_url with 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, closing state, a Snapshots panel with confirmed release (DELETE /v1/trainers/{id}/snapshots/{seq}), and op lane / snapshot_seq / compute_ms columns.

  • 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, split and --rubric files.

  • Breaking (evals): a dataset whose metadata.rubric doesn't parse answers 422 instead of scoring with non_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 without GRAD_SECRETS_KEY) is counted as status_class="501" and logged at info, so GradApiErrorRateHigh and the 5xx panels count only real server faults.

  • CLI: grad runs inspect numbers attempts from 1, like the events and the console; grad train --set takes PARENT.FIELD for 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_field instead 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's adapter: {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, suggests adapter.merge_on_export). Free-form maps stay free-form (metadata, pricing, score maps, record contents); source filters are 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 schemas additionalProperties: false. The CLI, whose typed requests used to drop such a key before sending, refuses it in run files, split and --rubric files with the same hint (unknown recipe field 'adapter.merge_on_exprot' (did you mean ...)).

  • Python SDK: sources.update(sample_rate=None) (or version_interval=None, filters=None) sent a JSON null the server refuses (422); None now keeps those values, like leaving them out. None still clears the schedule and the record caps.

  • CLI: grad runs export of an embedding run wrote adapter: {kind: encoder_full}, which grad train -f refused (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.rubric isn't a list of rubric items used to score with non_empty without a word; it now answers 422 validation_error naming the bad field (Dataset 'x' has a metadata.rubric that isn't ...: metadata.rubric.0.validatr: unknown field ...). An eval that passes its own rubric is unaffected.

  • Render preview (POST /v1/datasets/{name}/render, grad render, the console): token counts use the base's catalog chars_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}/metrics no longer has a Server-Sent Events mode, so an alpha.7 CLI's grad runs logs --follow fails against this server; upgrade the CLI. The Go SDK's lists and Resume and the Rust SDK's lists and create calls take options structs (details below).

  • Breaking (workers): /complete with a status the job's kind doesn't support answers 422 unsupported_completion for every kind.

  • Building the CLI from source needs Rust 1.88.

  • Helm: the chart validates its values against values.schema.json (unknown keys fail the install), workers.auth also takes a list, and API pods drain for api.shutdownDrainSeconds before stopping.

  • Server at scale (measured with 1k workspaces, 100k runs, 10M job events, a 1M-record dataset, 200 workers and 5,000 event streams): every open run event stream leaked memory until the API ran out (upstream @hono/node-server bug, now 2.1.11); run plans, eval plans and dataset filters no longer load a whole dataset version (a plan on more than 100k records is estimated from a spread sample and says so); a push, import or source sync indexes only the new parts instead of the whole dataset, and parts are (de)compressed off the event loop; idle workers polling a queue they can't take from no longer contend on the claim lock or the database pool; the waiting-for-compute and job-event retention sweeps keep up with 100k queued runs and thousands of events a second; each run event is serialized once for all its streams; migration 0011 adds the indexes that workspace purges and GET /v1/usage?run_id= were missing, and the usage reports skip Postgres JIT.

  • SDKs: one name per verb. sources.delete (Python, TS), Sources.Delete (Go) and sources().delete (Rust) replace remove, which stays as a deprecated alias (it shipped in 0.2.0-alpha.7); grad sources delete is the CLI verb and remove its alias. Breaking (Go): Runs.Resume(ctx, id, grad.ResumeOptions{MaxCostUSD: 10}) and run.Resume(ctx, grad.ResumeOptions{}) take an options struct instead of a required cap. Breaking (Rust): runs().create, evals().create, datasets().score and artifacts().create_import take &CreateOptions { idempotency_key } instead of a positional key; sources().create_with reads the key from SourceOptions::idempotency_key, and sources().create no longer takes one.

  • SDKs: scores and counts. TypeScript evals.postScores(id, scores) and Go Evals.PostScores post scores for an awaiting_scores eval, as Python and Rust do; all four send 1,000 per request and return accepted summed over the requests (Python returned the last request's count, Rust sent everything in one request). runs.counts (Python, TS), Runs.Counts (Go), runs().counts (Rust) and grad runs counts [--search] read GET /v1/runs/counts. The Rust SDK prints a run plan with println!("{plan}"), like the other SDKs.

  • CLI: grad secrets get NAME shows a secret's metadata (never its value); grad artifacts import-status ID shows an artifact import queued with --no-wait. The Homebrew formula installs the bash, zsh and fish completions.

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

  • SDKs: a followed event stream fails fast on a dead server. events(follow) and wait() in all four SDKs (and grad runs events --follow, grad runs wait) give up after 20 dropped or refused reconnects in a row (Go allowed 10, Rust 8, TypeScript reconnected forever), counted only once the stream has been open: a server that was never up fails after the usual request retries (about a second) instead of retrying for three minutes.

  • CLI: the vllm serve line grad artifacts download --output prints carries --max-lora-rank, the adapter's rank rounded up to a value vLLM accepts; vLLM's default (16) refuses grad's default rank-32 adapters.

  • Run comparison reads. GET /v1/runs/{id}/metrics?max_points=N returns a run's whole curve in one page, thinned to at most N points spaced evenly back from the newest (eval points thinned separately, so a sparse eval curve survives) and without the steps a resumed attempt replayed. A 100,000-point run answers in about 300 ms. GET /v1/runs/counts (countRuns / count_runs / CountRuns) counts the workspace's runs per status, narrowed by q like the list; migration 0012 adds the index it reads (100,000 runs: 14 ms).

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

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

  • Evals: a transient failure (storage, the database) while handing a claimed eval to its worker requeues the eval at once, spending the attempt, as runs and imports already did; before, the eval stayed leased until its lease expired.

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

  • List filters. GET /v1/runs takes status (comma-separated, e.g. queued,running) and q (a case-insensitive name substring, or an exact id); GET /v1/evals takes status; GET /v1/imports takes status and dataset; GET /v1/datasets and GET /v1/artifacts take q. Filters keep the same newest-first cursor. Every SDK's generated client has them.

  • SDKs and CLI: list filters. runs.list(status=["failed", "cancelled"], search="sft"), evals.list(status=), imports.list(status=, dataset=), datasets.list(search=) and artifacts.list(search=) in Python (TS takes the same options object; Rust takes RunFilter, EvalFilter, ImportFilter and ArtifactFilter, and datasets().list(search, page)). Breaking (Go): Runs.List, Evals.List, Imports.List, Datasets.List and Artifacts.List take an options struct (grad.RunListOptions{Status: ..., Search: ...}; Artifacts.List(ctx, name) is now grad.ArtifactListOptions{Name: name}). Breaking (Rust): those lists and their list_all take the filter. The CLI has grad runs list --status failed,cancelled --search sft, grad eval list --status, grad imports list --status --dataset, and --search on grad datasets list and grad artifacts list. Resolving a run by name (grad runs get NAME, Rust find_by_name) asks the server for matching names instead of walking every run.

  • SDKs: uploads of any size. The TypeScript SDK sent presigned uploads under the 60 s per-attempt timeout, so an upload slower than that (a few GB of weights) failed; uploads now have no per-attempt deadline (an AbortSignal still cancels them). It also read the whole file into memory first (Node's fetch buffers a Blob body, even from openAsBlob): a 2 GiB upload peaked at 2.1 GiB RSS, now 99 MiB, streamed from disk through node:http(s) with its Content-Length. With a fetch option (a proxy wrapper), the upload goes through that fetch as a stream of the file; before, it sent the text [object Object]. The Go SDK now retries an upload (dropped connection, 5xx), rewinding the file each time.

  • SDKs: one retry rule everywhere, pinned by tests/fixtures/wire/retries.json, which every SDK replays: a Retry-After above 60 s raises the typed error at once in every SDK (Python and Rust used to sleep 60 s and retry). Python's retry_after is on every API error, not only 429. The Rust SDK closes idle connections after 4 s, below grad-server's keep-alive, as Python does.

  • Go: Evals.Results and Evals.Outputs (and on *Eval), as the other SDKs have, and Download(ctx, dir, grad.Extract()) (also on Run.Download) writes the bundle's verified files into a new directory, as Python, Rust and the CLI do: regular files with safe paths only, each checked against manifest.json, and nothing left behind on failure. TypeScript has the same as download(dest, { extract: true }) (streamed, no tar dependency).

  • TypeScript: a CRLF split across two SSE chunks no longer splits an event.

  • Rust: collect-all helpers where the other SDKs iterate every page: imports().list_all(), artifacts().list_all(name), runs().checkpoints_all(id), evals().results_all, failures_all and outputs_all (bounded like every list_all).

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

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

  • grad completion bash|zsh|fish|elvish|powershell prints a shell completion script.

  • CLI: every command that shows one thing answers to get (grad runs get, artifacts get, eval get, imports get, sources get, besides inspect/status/show), and grad sources delete works like remove.

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

0.2.0-alpha.7#

No migrations. The last fixes from the launch review:

  • Gradiated Cloud training isn't live yet. api.gradiated.com doesn't serve grad's /v1 API 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 problem code from api.gradiated.com into a feature-unavailable error (cloud_training_unavailable, CLI exit 6): "Gradiated Cloud training isn't available yet; run grad local up or point at your server with --base-url or GRADIATED_BASE_URL." The default base URL is unchanged. The README quickstart and grad --help start a server of your own (grad local up, the Docker Hub images, Helm) and say Cloud is coming soon.
  • A run is never billed past its max_cost_usd. The step that carries a run past its cap was billed in full; it is now billed only up to the cap. The stop, the resume check and the run's tokens_processed and cost_usd are 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 403 pin_managed_by_cloud for inference: 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 (EOFError or zlib.error mid-stream) fails at once with invalid_artifact ("upload: the archive is truncated or corrupt"); it used to crash the import worker, retry until max_attempts and 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 | head and other pipes whose reader leaves early no longer panic the CLI with exit code 101; grad ignores the closed pipe and exits as it would have (so grad ... | grep -q still passes under set -o pipefail).
  • The web console no longer renders a blank page in a browser whose locale Intl rejects (Chromium on Linux with LANG unset reports en-US@posix); it falls back to en-US. The Datasets empty state points at grad import FILE --dataset NAME (it named grad datasets import, which only takes Hugging Face datasets), and the Health page says evals run on eval workers.

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 whatever ssl* parameters the URL carries (a stale sslmode=no-verify included). 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 against localhost).
  • Helm: GRAD_WORKER_AUTOSCALING is set only when keda.enabled and an enabled pool takes train jobs (api.workerAutoscaling overrides 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_unavailable with "Evals aren't available on Gradiated Cloud yet"; recipe.evals on Cloud is always 422 checkpoint_evals_unsupported_on_cloud.
  • Web console: an Artifacts page (/artifacts): every artifact as name@version with its format, base model, provenance, size, age and pins; an artifact's page shows its manifest, provenance and pins, downloads it and deletes it after a confirmation (a pinned one shows the 409 artifact_pinned holders).
  • Artifacts list their pins. Every Artifact (list, get, a run's artifact, import results, the internal resolve and pin responses) carries pins (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_RECORDS and GRAD_CLOUD_JWT_AUDIENCE are no longer read; their values are fixed at the old defaults (1M tokens / 5 minutes, 30 s, 900 s, 100k, training). The deprecated unprefixed INFERENCE_*/JUDGE_* names are gone too: set GRAD_INFERENCE_*/GRAD_JUDGE_*. The API container no longer gets GRAD_JUDGE_BASE_URL (only eval workers use it).
  • 503 capacity_unavailable is 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, honouring Retry-After, for up to GRAD_EVAL_CAPACITY_WAIT_SECONDS (default 720) per call, keeping its lease and spending no attempt. EvalRun.waiting_reason says 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.evals answers 422 checkpoint_evals_unsupported_on_cloud at plan and create, since Cloud serves only published artifacts: evaluate run.artifact after 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_hf and artifacts().import_hf are from_hf, as in the other SDKs, and import_hf_with_secret is gone (set ImportSource.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=none checks Host and Origin. A public DNS name in Host is 403 host_not_allowed (DNS rebinding), and a cross-site browser request from an origin outside GRAD_CORS_ORIGINS is 403 cross_site_request. Loopback, IP literals, single-label names (compose services), .local/.internal/.svc names and link navigations still work.
  • Every alert in the chart's PrometheusRule is severity: warning (GradApiErrorRateHigh was 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's head_file must be the format's own head file, JSON configs are at most 16 MiB, and * in a format pattern no longer crosses /, so sub/model.safetensors is dropped, not kept unchecked. A malformed upload is the tenant's 422 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. revision must be a branch, tag or commit name.
  • Cloud console and service JWTs whose exp is 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_PREEMPTIONS counts 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=...) and grad 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 starts grad-dev-inference, a CPU OpenAI-compatible endpoint, and points the API's and eval worker's inference and judge URLs at it, so grad eval works with no flags (was 501 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.sh evals 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 --local runs the docs' blocks against that stack, and --compile type-checks their TypeScript, Go and Rust blocks (56 were never checked; the README's Rust quickstart didn't compile).
  • TypeScript and Go raise FeatureUnavailableError for any 501, like Python and Rust (it was a ServerError, which reads as "try again later"). TypeScript has artifacts.waitImport(id) and prints a readable plan from console.log(plan); Python's artifacts.download_url is typed ArtifactDownloadUrl.
  • 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 train sums up the selected checkpoint in one line, and grad artifacts list prints readable sizes. grad local up and down print a few lines, not compose's progress.
  • runs.plan and runs.create warn when only CPU workers are online for a GPU-sized model. A router whose report fold misses max_quality_drop says so.
  • grad local up can 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_AUTOSCALING from keda.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 and grad 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_total by 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_rows and the workers' grad_trainer_checkpoints_total. Worker series carry their pool. docs/METRICS.md lists them all.
  • Alerts (metrics.prometheusRule.enabled, all warnings): GradJobFailureRateHigh, GradUsagePushLagging, GradUsageRowsParked, GradTokenReviewSaturated, GradDatabaseErrors, GradStorageErrors, GradMaintenanceStalled, and GradNoWorkersForQueuedJobs for eval workers too. GradApiErrorRateHigh needs more than 0.1 requests/s.
  • Logs: every component writes JSON lines to stdout with time, level, component and the ids that apply (request_id, job_id, run_id, attempt, worker_id, workspace_id); errors carry error_type and stack, 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's api.internalPort serves it on the ClusterIP Service <fullname>-internal (never the Ingress), with networkPolicy.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_JSON entries take an optional serving_id.
  • The gradiated source answers 501 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 answers 503 billing_unavailable, not 422 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 MODEL uploads an adapter, merged model, encoder or router bundle trained elsewhere; grad artifacts import hf://owner/name[@revision] --base MODEL imports 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's config.json (a failed check is 422 invalid_artifact naming the file, CLI exit 5) and releases an ordinary name@YYYY-MM-DD-n artifact to download, evaluate or continue training from. Every SDK has artifacts.upload and the Hub import (from_hf / fromHf / FromHF / import_hf).
  • Every artifact has provenance (the run, the uploader key, or the hf:// 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 on INTERNAL_PORT (POST /internal/v1/worker-tokens), bound to a host, job kinds, a GPU size and an expiry. Workers read GRAD_WORKER_TOKEN or GRAD_WORKER_TOKEN_FILE on 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 most GRAD_MAX_QUEUED_PER_WORKSPACE (500); past that, creating a job answers 429 queue_limit, which every SDK raises at once as QueueLimitError instead of retrying. Workers only get runs whose min_gpu_memory_gb fits their GPU. Runs carry queue_position and queue_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 usage prints a period's cost and tokens by kind (training, eval, scoring, labeling, teacher) with the top runs and evals; --by day|week|month|model|recipe|kind groups it and --from/--to set the period. GET /v1/usage/summary, usage.summary(...) in every SDK, and a usage page in the web UI. The old listing is grad usage list.
  • Source controls. Filters are checked per provider (422 source_filter_unsupported or source_filter_invalid) and sent to the provider's API where it supports them. sample_rate, max_records_per_sync and max_records_per_day cap what a source brings in, version_interval (default 15 min) makes a busy source commit fewer dataset versions, and grad sources update (PATCH /v1/sources/{id}) changes any of them from the next sync.
  • Browser clients: GRAD_CORS_ORIGINS allows listed origins on /v1, and grad 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 are eval jobs claimed by node dist/main.js worker --kinds eval (the grad-server image; Helm's import pool runs one, and grad local up adds grad-eval-worker). Restarting the API no longer interrupts an eval. Breaking (operators): GRAD_INFERENCE_API_KEY, GRAD_JUDGE_API_KEY and EVAL_CONCURRENCY move to the eval workers, and EVAL_EXECUTOR is gone.
  • Helm defaults to workers.auth=kubernetes: one ServiceAccount per pool and no worker keys (workers.auth=static keeps 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_BUCKET is required, and local-disk mode (STORAGE_DIR, BLOB_SIGNING_SECRET, the /blobs/* routes) is gone. grad local up runs SeaweedFS (S3 on 127.0.0.1:18786) and migrates with a one-shot migrate service. Data in an old local stack's grad-storage volume is not migrated: push datasets again. S3_PUBLIC_ENDPOINT (Helm storage.s3PublicEndpoint) signs client uploads for another host.
  • grad local up publishes the API and web UI on 127.0.0.1:18787, Grafana on 18788 and Prometheus on 18789 (were 8787, 3000 and 9090). It moves a busy default port to a free one and says so, remembers the choice, and grad local status prints 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 add provenance); 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_MINUTE raises a provider's rate.
  • Breaking: a UsageRecord's kind is the usage kind (training replaces run; evals are eval, scoring, labeling or teacher). Rust client.usage().list takes a UsageQuery.
  • Breaking (Cloud operators only): CLOUD_INTERNAL_API_URL's /auth/verify and billing/usage/cursor calls and USAGE_EXPORT_LAG_SECONDS are gone.
  • The default batch_size is a quarter of the training examples (at least 8) when that is under 128, so a small dataset takes several optimizer steps. runs.plan adds cost_breakdown (training, teacher and eval), and its estimate includes recipe.evals.
  • npm: until 1.0 every release, alpha included, gets the latest dist-tag, so npm i @gradiated/grad installs the newest one (it was stuck on alpha.1).

Removed

  • The deploy surface. grad-server drops the /v1/deployments, /v1/route, /v1/embeddings and /v1/feedback stubs; the SDKs and CLI drop deploy(), deployments, grad deploy and DeployUnavailableError. 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 watch and a re-attached grad train --wait show 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_unavailable and the pool drops the dead connection.
  • Concurrent identical pushes and promotes no longer make duplicate versions or releases (migration 0002), and record_count counts a record pushed or synced again once.
  • A retried eval cancel or run resume returns the current state instead of 409, and dataset.score honours Idempotency-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 /complete answers only the credential that closed the attempt (others get 409 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-sdk and grad-cli. The Go module tag step accepts a tag pushed by hand.
  • The images are published to Docker Hub as docker.io/gradiated/grad-server and docker.io/gradiated/grad-trainer, with the same tags mirrored on GHCR. grad local up, the embedded compose file and the Helm chart default to Docker Hub.

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 unless GRAD_SOURCES_EGRESS_ALLOW lists 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, so 64:ff9b::a9fe:a9fe can'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=none refuses a non-loopback HOST unless AUTH_MODE_NONE_ALLOW_REMOTE=true (server/docker-compose.yml sets 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 as grad-sdk on crates.io, where grad is taken.

  • The eval endpoint settings are GRAD_INFERENCE_BASE_URL, GRAD_INFERENCE_API_KEY, GRAD_JUDGE_BASE_URL and GRAD_JUDGE_API_KEY everywhere (server, compose, Helm, docs). The unprefixed INFERENCE_* / JUDGE_* names still work and log a deprecation warning.

  • A run stopped because the workspace ran out of balance (Cloud) is stopped_balance; stopped_budget means the run's own cap and resumes only with a higher one.

Fixed

  • grad local up and grad local reset only ever write the local profile. They used to overwrite whichever profile --profile or GRADIATED_PROFILE selected, and now refuse when that profile (or local itself) points at a server that isn't on this machine.
  • grad runs inspect --yaml round-trips: zero values (warmup: 0) are kept, a continued-training run names its starting artifact as model, and optimizer, eval_every and loggers are exported, so grad train -f plans 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 grad CLI, including grad local up for a local stack.
  • Public container images on GHCR (grad-server, grad-trainer, grad-trainer:*-gpu), published as main and sha-<7> on every push to main and as X.Y.Z/latest on release. grad local up pulls its own version (or main from a source build); --image-tag picks another.
  • A Helm chart with KEDA scale-to-zero for GPU trainers and air-gapped overrides.

Changed

  • grad is now licensed under MIT (it was Apache-2.0). Every package's license metadata says MIT.