Skip to content

air: add a hidden air serve command - #7954

Draft
erarpitagarwal wants to merge 1 commit into
erarpitagarwal/air-3-serve-clientsfrom
erarpitagarwal/air-4-serve
Draft

erarpitagarwal wants to merge 1 commit into
erarpitagarwal/air-3-serve-clientsfrom
erarpitagarwal/air-4-serve

Conversation

@erarpitagarwal

@erarpitagarwal erarpitagarwal commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Stack (review in order; each PR is based on the one before):

  1. air: add the Model Serving client for registering a checkpoint #7951: the Model Serving client for registering a checkpoint
  2. air: add a hidden air register command #7952: air register
  3. air: add the endpoint and MLmodel clients for serving a version #7953: the endpoint and MLmodel clients for serving a version
  4. air: add a hidden air serve command #7954: air serve (this PR)

Changes

Adds a hidden databricks air serve command. It serves a registered Unity Catalog model version on a serving endpoint, using the clients from the previous PR. It takes a YAML file (-f) or its required fields as flags (--uc-model, --endpoint-name); flags override the file.

# serve.yaml
uc_model: main.serving.qwen30b_sglang
endpoint_name: qwen3-30b-sglang
compute:
  gpu:
    accelerator_type: GPU_1xA10
    min_replicas: 0
    max_replicas: 2
  • Which version: the newest READY version, or model_version (--model-version).

  • Compute follows from the version (read from its MLmodel). When the file leaves compute out:

    • a dedicated checkpoint: latency_sensitive, 600 model units;
    • a command: one GPU_1xA10 replica;
    • any other model: one CPU replica.

    A compute block of the wrong kind is refused before the endpoint changes.

  • Replicas are sent as a provisioned concurrency range, 4 per replica. Endpoints on H100 need min_replicas equal to max_replicas, because they aren't scaled.

  • Dedicated compute:

    • mode selects a low-latency or throughput profile. Replicas have no mode yet, so it's refused for any other version rather than ignored.
    • Dedicated endpoints take one unit count and no commitment term yet, so min_units must equal max_units, and reservation_term is refused.
  • Waiting: it returns once the endpoint accepts the create or update; --watch waits until it's ready. It prints the URL to query, which is the audio route for an audio task. Ctrl-C or --timeout before the endpoint changes says nothing was changed; after, it prints the command that continues.

  • The endpoint config is replaced, not merged. Environment variables aren't set yet (TODO), so an update clears any the endpoint has.

  • Also: --dry-run, --override, -h config.<field>, --timeout and -o json, as for air register.

Why

Last of four PRs. Registering and serving are separate commands, so a version can be registered once and served on several endpoints, or re-served with new compute without registering again. The command stays hidden, with no changelog entry, until the server APIs are on everywhere.

Tests

  • go test ./cmd/air/, go vet and golangci-lint (0 issues) pass. New tests cover the schema (defaults, partial blocks, refused fields, flags over the file), each kind's defaults, compute of the wrong kind, version selection, serving with and without --watch, JSON output and field help.
  • Against a staging workspace, an earlier revision of air serve with only the model and endpoint picked the newest READY version, read its MLmodel, created an endpoint with one GPU_1xA10 replica, and returned while it updated; the endpoint was then deleted. A dedicated checkpoint hasn't been served from this revision yet.

This pull request and its description were written by Isaac.

air serve serves a registered Unity Catalog model version on a serving
endpoint, from a YAML file (-f) or flags. It reads the version's MLmodel to
pick the compute: dedicated inference for a dedicated checkpoint, GPU
replicas for a command, CPU for any other model. It returns once the
endpoint accepts the update, or with --watch once it's ready.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 7ba5795

Run: 45522389368

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 19 6:26
💚​ aws-windows-latest-4core-16gb 1 274 17 4:10
💚​ azure linux-2core-8gb 1 271 19 6:39
💚​ azure-windows-latest-4core-16gb 1 273 17 3:31
💚​ gcp linux-2core-8gb 1 272 19 6:12
💚​ gcp-windows-latest-4core-16gb 1 274 17 4:22
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:23 azure linux-2core-8gb TestAccept
4:08 aws-windows-latest-4core-16gb TestAccept
4:05 gcp linux-2core-8gb TestAccept
3:58 aws linux-2core-8gb TestAccept
3:39 gcp-windows-latest-4core-16gb TestAccept
3:30 azure-windows-latest-4core-16gb TestAccept

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants