Skip to content

air: add a hidden air register command - #7952

Draft
erarpitagarwal wants to merge 1 commit into
erarpitagarwal/air-1-register-clientfrom
erarpitagarwal/air-2-register
Draft

erarpitagarwal wants to merge 1 commit into
erarpitagarwal/air-1-register-clientfrom
erarpitagarwal/air-2-register

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 (this PR)
  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 a hidden databricks air register command. It registers a checkpoint in a Unity Catalog volume as a new model version and waits until the version is ready, using the client from the previous PR. It takes a YAML file (-f) or its required fields as flags (--model-source, --uc-model); flags override the file.

# register.yaml: a checkpoint served by your own command
model_source: /Volumes/main/weights/qwen3_30b_a3b
uc_model: main.serving.qwen30b_sglang
engine:
  environment:
    version: 6
    dependencies: [sglang==0.5.23]
  command: python -m sglang.launch_server --model-path qwen3_30b_a3b --attention-backend triton --sampling-backend pytorch --host 0.0.0.0 --port 8080
  • What serves the checkpoint: with engine, the user's command (vLLM, SGLang, a FastAPI app). Without it, Databricks serves the checkpoint with dedicated inference.
    • engine.environment.version has no default: 6 for the Standard environment, or databricks_ai_v6 for the Databricks AI environment, as for air run.
    • engine.task defaults to llm/v1/chat.
  • Logged models aren't supported yet: model_source: models:/m-... is refused, with a TODO.
  • The request is the YAML: registerModelPackage takes the file's model_source, uc_model and engine as they are, with the environment version in canonical form.
  • Resuming: the idempotency key is printed first, and an interrupted or timed-out run prints the command that continues it (--idempotency-key). --retry-failed-staging copies the weights again after a failed copy.
  • Also: --dry-run checks the file without a workspace, --override sets a field, -h config.<field> documents one, --timeout bounds the wait, and -o json reports the result or the error code, including for a failed login, as air run does.
  • Shared air run code, so both commands load and document YAML the same way:
    • the config loader and --override path check take the schema to check against;
    • field help takes the command it documents (the runtime and agent-skill notes stay on air run -h config only);
    • the unknown-field check takes the schema and the command whose -h lists the fields, so an unknown key in a register file gets the same "did you mean" error as in a run file;
    • the field help unwraps a pointer before naming a union type, so engine.environment.version (a *stringOrInt) shows "string or int" (air run has no such field, so its help is unchanged);
    • effectiveIdempotencyToken takes the configured token instead of the run config;
    • "run config must be a YAML mapping" now reads "config must be a YAML mapping".

On success it prints the databricks air serve command for the version, which the last PR of the stack adds.

Why

Serving a checkpoint today means calling mlflow.<flavor>.log_model from Python: pickling a model, copying weights into it and packing an environment. With this command the user hands over text and the files a training job already wrote to a volume; the server writes the MLmodel and builds the environment. 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, refused fields, flags over the file), dry run, resuming, failed and timed-out registrations, JSON output and field help.
  • An earlier revision, which registered and served in one command, ran end to end against a staging workspace. This revision of air register hasn't run against a workspace yet.

This pull request and its description were written by Isaac.

air register registers a checkpoint in a Unity Catalog volume as a new model
version, from a YAML file (-f) or flags, and waits until the version is ready.
With engine, the version is served by the user's own command; without it,
Databricks serves the checkpoint with dedicated inference.

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

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 216bb2b

Run: 45522365757

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 19 6:05
💚​ aws-windows-latest-4core-16gb 1 274 17 3:31
💚​ azure linux-2core-8gb 1 271 19 6:30
💚​ azure-windows-latest-4core-16gb 1 273 17 3:51
💚​ gcp linux-2core-8gb 1 272 19 6:35
💚​ gcp-windows-latest-4core-16gb 1 274 17 3:59
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:28 azure linux-2core-8gb TestAccept
4:15 aws linux-2core-8gb TestAccept
3:57 gcp linux-2core-8gb TestAccept
3:49 azure-windows-latest-4core-16gb TestAccept
3:36 gcp-windows-latest-4core-16gb TestAccept
3:17 aws-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