Skip to content

air: add the Model Serving client for registering a checkpoint - #7951

Draft
erarpitagarwal wants to merge 1 commit into
mainfrom
erarpitagarwal/air-1-register-client
Draft

erarpitagarwal wants to merge 1 commit into
mainfrom
erarpitagarwal/air-1-register-client

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 (this PR)
  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

Changes

Adds the client air register will use. No command calls it yet, so nothing changes for users.

  • registerAndFinalize (registerapi.go) registers a checkpoint in a Unity Catalog volume as a new model version, in three calls:
    • registerModelPackage once, with model_source, uc_model, an optional engine (environment version and dependencies, command, task), idempotency_key and retry_failed_staging;
    • checkModelDeploymentStagingStatus while the checkpoint's weights are copied into the version;
    • finalizeModelPackage once they are.
  • Retries: each call is safe to repeat, so a 5xx, 408 or dropped connection that the SDK hasn't retried is repeated up to twice, 15 s apart (libs/retry).
  • Statuses the client can't act on fail at once with the server's response named, rather than looking like progress. The caller's context bounds the wait; air register sets it from --timeout. Failed staging is its own error and isn't finalized, so air register can say how to copy the weights again.
  • modelcmd.go has the JSON error codes air register and air serve report, such as STAGING_FAILED, TIMEOUT and INTERRUPTED, or the server's own code, and whether retrying can help.

Why

#7642 is about 4,800 lines, so it is split into four PRs:

  1. this client;
  2. air register: its YAML, flags and the command;
  3. the clients air serve uses for endpoints and for a version's MLmodel;
  4. air serve.

Tests

  • go test ./cmd/air/, go vet and golangci-lint (0 issues) pass.
  • New tests cover register, poll and finalize, including retries, each failure state, cancellation and malformed statuses; the JSON of all three requests; and the error codes and retryability.

This pull request and its description were written by Isaac.

registerAndFinalize registers a checkpoint in a Unity Catalog volume as a
model version, waits while its weights are staged, then finalizes the
version. No command calls it yet; air register uses it in a follow-up.

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: e29b39c

Run: 45522205171

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 19 5:10
💚​ aws-windows-latest-4core-16gb 1 274 17 3:45
💚​ azure linux-2core-8gb 1 271 19 5:11
💚​ azure-windows-latest-4core-16gb 1 273 17 4:03
💚​ gcp linux-2core-8gb 1 272 19 5:47
💚​ gcp-windows-latest-4core-16gb 1 274 17 4:13
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:03 gcp linux-2core-8gb TestAccept
3:43 aws-windows-latest-4core-16gb TestAccept
3:40 azure-windows-latest-4core-16gb TestAccept
3:39 gcp-windows-latest-4core-16gb TestAccept
3:28 azure linux-2core-8gb TestAccept
3:27 aws linux-2core-8gb 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

AIR Databricks AI Runtime CLI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants