Skip to content

[Core] Slice admission checks, static weights, fixes - #1289

Closed
slin1237 wants to merge 1 commit into
mainfrom
core/slice-admission-checks-static-weights
Closed

slin1237 wants to merge 1 commit into
mainfrom
core/slice-admission-checks-static-weights

Conversation

@slin1237

Copy link
Copy Markdown
Collaborator
  • TPU slices with Kueue. The controller can answer a Kueue AdmissionCheck for slice provisioning (tpuSliceProvisioning.admissionCheck). The pods of a queued Instance are created first, and OME provisions the slice once Kueue reserves quota. The ome-resources chart can create the check (kueueAdmissionCheckName), and the quota manager can list checks on its ClusterQueues.
  • Multi-cluster routing. New capacity mode StaticWeights weighs each cluster by its guaranteed replicas and polls nothing, so a traffic split stays steady while clusters autoscale.
  • Configuration instead of built-in values. modelPaths, podOnlyAnnotationPrefixes, servingRuntime.inheritMaxDepth, the replica minimum, worker count and HPA CPU target in the deploy block, and the ome-agent transfer settings come from configuration. PodMonitors use podMonitor.interval in every deployment mode. The chart values, config/configmap and config/ome-agent/ome-agent.yaml carry the earlier values.
  • Runtime selection. Automatic selection ranks a runtime merged with its inherit-from chain and skips a runtime whose chain does not resolve. kubectl ome runtime explain shows the same verdicts.
  • Rollout engine. About 65 fixes. A canary step held by the roll budget says why, and a canary counts a replaced instance once. A pause lets a prefill and decode pair finish its open batch. A topology key added to a serving gang reaches it once the old pods drain. A Failed pod never counts as serving. Thirteen performance changes and a set of refactors come with them.
  • Tests. The in-process replay drivers stage probes, container exits, image and annotation edits, and node recovery.

Upgrade note: an installation that writes the inferenceservice-config ConfigMap itself needs the modelPaths key. To keep today's behaviour it also needs podOnlyAnnotationPrefixes, servingRuntime.inheritMaxDepth (5), and in the deploy block replicas.defaultMinReplicas (1), replicas.defaultWorkerSize (1) and defaultCPUUtilizationPercent (80). A custom ome-agent config file needs endpoint, max_concurrent_downloads and the serving_agent, fine_tuned_adapter and replica blocks. The agent names a missing key when it starts.

TPU slices and Kueue
- The controller can answer a Kueue AdmissionCheck for TPU slice
  provisioning (tpuSliceProvisioning.admissionCheck). On a ClusterQueue
  that lists the check, the pods of a queued Instance are created first
  and held by Kueue. OME provisions the slice once Kueue reserves quota
  and answers Ready when every host of the slice is visible, so an
  Instance without quota holds no slice. When a slice is not ready
  within provisionTimeout, OME answers Retry and Kueue hands the quota
  back.
- The ome-resources chart creates the AdmissionCheck when
  kueueAdmissionCheckName is set. The quota manager can list admission
  checks on the ClusterQueues it creates (materialize.admissionChecks).

Multi-cluster routing
- New capacity mode StaticWeights: a cluster weighs its guaranteed
  replicas times its capacity factor, and no endpoint is polled. A
  TrafficMap entry reports guaranteedReplicas.
- The probe and capacity durations (period, timeout, maxAge) are
  pointers, so an unset duration is not written as 0s.

Configuration replaces built-in values
- modelPaths in the inferenceservice-config ConfigMap holds the model,
  fine-tuned weight and overlay mount paths. The controller and the pod
  webhook name the missing key when a path they need is unset.
- podOnlyAnnotationPrefixes lists the annotation prefixes that are
  copied to pod templates and kept off Services. OME's own prefixes
  stay built in.
- servingRuntime.inheritMaxDepth limits the length of a runtime's
  inherit-from chain and counts the runtime itself. Zero or no value
  allows any length. Cycles are still rejected.
- The deploy block carries the replica minimum
  (replicas.defaultMinReplicas), the worker count of a leader-and-worker
  group (replicas.defaultWorkerSize) and the CPU target of an HPA that
  names no metric (defaultCPUUtilizationPercent). A component that sets
  none of its own takes them. Without a CPU target Kubernetes supplies
  its default metric. An HPA or KEDA scaler without any minimum, and a
  group without any worker count, name the missing setting.
- PodMonitors take port, path and interval from the podMonitor block in
  every deployment mode. Extra metrics endpoints get the same interval.
- The ome-agent reads part sizes, thread counts and retries for the
  serving sidecar, the fine-tuned adapter and the replica agent from
  its config file. Its hub client takes endpoint and
  max_concurrent_downloads from the same file and has no built-in
  value for them. config/ome-agent/ome-agent.yaml carries the values
  the agent used until now, and the agent names a missing key when it
  starts. The model agent keeps its defaults through xet.WithDefaults.
- The chart values and config/configmap carry the earlier values
  (depth 5, minimum 1, one worker, 80 percent CPU, a 10 second scrape
  interval), so a default install behaves the same.

Runtime selection
- Automatic selection ranks a runtime merged with its inherit-from
  chain. A runtime whose chain does not resolve is skipped, and the
  error that no runtime fits lists it with the cause.
- kubectl ome runtime explain shows the same verdicts and says when the
  chain is the cause. The CLI checks chains of up to five runtimes and
  assumes a replica minimum of one. It does not read the two settings
  from the operator's configuration.

Rollout engine
- A canary step held by the roll budget says why. A resume clears a
  promote given before it and restarts at step 0. A step's ready
  timeout restarts when the step makes progress, a timed step confirms
  that its pods still run, and a new run resumes at the same step.
  The canary status records which instances have served the new
  version (capacityProgress), so a replacement at the same index
  counts once.
- A pause lets both sides of a prefill and decode pair finish the batch
  that is open, so no new prefill is left without a matching decoder.
- A rollout that closes under a partition records the version most
  instances run as the version to roll back to.
- A topology key added to a gang that already serves reaches the gang
  once its old pods drain.
- A Failed pod never counts as serving, a Failed gang surges without a
  gate, a rebuilt gang's PodGroup matches its pods, retry records are
  cleared after recovery, and pod creation stops when retries run out.
  Evicted pods count toward the outage limit, a moved pod on a dead
  node holds its slot, and a pod lost while terminating frees its
  surge slot.
- Hold messages name what a move, a surge or a retry waits on.
- More fixes in the workload, coordination, canary, replica, placement
  and traffic packages. The manager cache drops pod tolerations and
  unread EndpointSlice fields, the scheduler checks node fit once for
  equal gang members and counts slots for uniform gangs, and long
  functions are split into named steps.

Tests
- The in-process replay drivers stage pod probes, container exits,
  image and annotation edits, protocol changes, node recovery and
  scale writes. The admission runner validates quota objects.

Signed-off-by: Simo Lin <25425177+slin1237@users.noreply.github.com>
Co-authored-by: Fan Yang <250624800+fanyang-real@users.noreply.github.com>
Co-authored-by: Wei Huang <1425903+Huang-Wei@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Review skipped: 953 files exceed the limit of 150

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

@github-actions github-actions Bot added documentation Documentation changes api API/Types changes in pkg/apis helm Helm chart changes crd CRD definition changes runtime Runtime configuration changes webhook Webhook changes ome-agent OME agent changes inferenceservice InferenceService controller changes rbac RBAC configuration changes autoscaling Autoscaling (HPA/KEDA) changes controller Controller changes multi-node Multi-node/distributed inference changes xet Xet/HuggingFace acceleration changes tests Test changes config Configuration changes dependencies Dependency updates labels Nov 30, 2026
@claude

claude Bot commented Nov 30, 2026

Copy link
Copy Markdown

👋 The PR description doesn't fully follow
PULL_REQUEST_TEMPLATE.md:

  • Missing header: ## What this PR does
  • Missing header: ## Why we need it
  • Missing header: ## How to test
  • Missing header: ## Checklist

Please update the PR description so reviewers have the context they need.

@slin1237 slin1237 closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API/Types changes in pkg/apis autoscaling Autoscaling (HPA/KEDA) changes config Configuration changes controller Controller changes crd CRD definition changes dependencies Dependency updates documentation Documentation changes helm Helm chart changes inferenceservice InferenceService controller changes multi-node Multi-node/distributed inference changes ome-agent OME agent changes rbac RBAC configuration changes runtime Runtime configuration changes tests Test changes webhook Webhook changes xet Xet/HuggingFace acceleration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant