Skip to content

v0.2.0-alpha.4

Pre-release
Pre-release

Choose a tag to compare

@joshsny joshsny released this 27 Nov 23:18
· 97 commits to main since this release

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.