--- title: kubectl ome runtime description: Explain which runtimes match a model, and show the effective runtime, revision history and inheritance tree behind an InferenceService. since: v1.3 --- `kubectl ome runtime` shows how OME picks the [serving runtime](../../concepts/runtimes/serving-runtimes.md) for a model or an [InferenceService](../../concepts/serving/inference-services.md), and what that runtime is made of. `explain` runs OME's [runtime selection](../matching/runtime-selection-scoring.md) and says why each runtime qualifies or doesn't. `effective` shows the runtime an InferenceService uses and the [revision](../../concepts/runtimes/runtime-revisions.md) it's pinned to, and `history` lists the revisions kept for that runtime. `tree` shows a runtime's [inheritance chain](../../concepts/runtimes/runtime-inheritance.md), the runtimes that inherit from it, and the InferenceServices that name them. The alpha `sync` action asks the controller to move a pinned InferenceService to its runtime's current spec. ```text kubectl ome runtime explain (--model NAME | --isvc NAME) [flags] kubectl ome runtime effective INFERENCESERVICE [flags] kubectl ome runtime tree RUNTIME [flags] kubectl ome runtime history INFERENCESERVICE [flags] kubectl ome runtime sync INFERENCESERVICE [flags] ``` | Subcommand | What it does | | --- | --- | | [`explain`](#explain) | Lists the runtimes OME can choose for a model, in rank order, and why the others don't qualify. | | [`effective`](#effective) | Shows the runtime an InferenceService uses, and the revision it's pinned to. | | [`tree`](#tree) | Shows a runtime's inheritance chain, the runtimes that inherit from it, and the InferenceServices that name them. | | [`history`](#history) | Shows the revisions kept for an InferenceService's runtime. | | [`sync`](#sync) | Alpha. Asks the controller to move a pinned InferenceService to its runtime's current spec. | `effective`, `history` and `sync` take the name of one InferenceService, and so does `explain --isvc`. The CLI looks for it in the namespace you give with `-n`, then in the namespace of your kubeconfig context, then in `default`. `explain --model` looks in that namespace for a BaseModel with the name, then for a ClusterBaseModel. `tree` takes the name of a runtime: a ServingRuntime in that namespace, or a ClusterServingRuntime. `effective`, `history` and `sync` read the InferenceService, its model, the runtime it names with the runtimes that runtime inherits from, and runtime revisions in the OME namespace. When the InferenceService names no runtime, `effective` and `history` also list the ServingRuntimes in its namespace and the ClusterServingRuntimes, and select one the way OME does. `effective` reads only the revisions named in `spec.runtime.revision` and `status.pinnedRevisionName`, while `history` and `sync` list every revision of the runtime. `sync` also lists the InferenceService's InferenceReplicas when a component runs on OMENative. `explain` reads the model, or the InferenceService and its model, and lists the ServingRuntimes in the namespace and the ClusterServingRuntimes. `--with-effective` adds what `effective` reads. `tree` lists runtimes and InferenceServices, and reads no revisions. The [kubectl-ome overview](overview.md) lists the RBAC each command needs, and [Guarded actions](guarded-actions.md) has the rule `sync` adds. `effective` and `history` print a table, and `tree` prints a tree. For all three, `-o wide` prints more detail, and `-o json` and `-o yaml` print the whole report, with `apiVersion: cli.ome.io/v1alpha1` and the kind `RuntimeEffectiveReport`, `RuntimeHistoryReport` or `RuntimeTreeReport`. `sync` prints its result, an ActionResult, as a table, or in full with `-o json` and `-o yaml`. Its `-o wide` prints the same table. On a terminal narrower than a table, the CLI wraps long cells, or prints each row as a list of fields when even the headers don't fit. Output to a file or pipe keeps one line per row. `explain` has no `-o` flag: it prints one table, which it always wraps to fit 80 columns, or a narrower terminal. ## `explain` ```text kubectl ome runtime explain (--model NAME | --isvc NAME) [flags] ``` `explain` runs the runtime selection that OME runs for an InferenceService that names no runtime, and prints a row for every ServingRuntime in the namespace and every ClusterServingRuntime. With `--model`, it matches the runtimes against a BaseModel or ClusterBaseModel. With `--isvc`, it matches them against the InferenceService's model, and also checks the accelerator class and the deployment modes the InferenceService asks for. It takes the model's name from `spec.model.name`, and looks the model up the same way as `--model`, whatever `spec.model.kind` says. When the InferenceService names a runtime in `spec.runtime`, OME doesn't run selection for it, as [When you name a runtime](../../concepts/runtimes/serving-runtimes.md#when-you-name-a-runtime) describes. `explain` still prints the table, and writes `Note: spec.runtime is explicit; automatic selection below is hypothetical.` to stderr. ### Flags {#explain-flags} | Flag | Default | Description | | --- | --- | --- | | `--isvc` | None | Explain runtime selection for this InferenceService's model | | `--model` | None | Explain runtime selection for this BaseModel/ClusterBaseModel | | `--ome-namespace` | `ome` | Namespace where the OME control plane is installed | | `--with-effective` | `false` | Append bounded effective context for --isvc (auto scan: 1,000 items/2 pages) | Plus the standard kubeconfig flags, such as `-n` and `--context`. Give exactly one of `--model` and `--isvc`, or the command fails with `exactly one of --model or --isvc is required`. `--with-effective` without `--isvc` fails with `--with-effective requires --isvc`. `--ome-namespace` matters only with `--with-effective`, which reads runtime revisions there. ### Output fields {#explain-output-fields} | Column | What it shows | | --- | --- | | RUNTIME | The runtime's name. | | SCOPE | `Namespaced` for a ServingRuntime, `Cluster` for a ClusterServingRuntime. | | COMPATIBLE | `Yes` when automatic selection can choose the runtime, `No` when it can't. | | PRIORITY | For a `Yes` row, the `priority` of the runtime's first `supportedModelFormats` entry that matches the model, or `1` when the entry sets none. `-` for a `No` row. | | WEIGHT | For a `Yes` row, that entry's `modelFormat` weight plus its `modelFramework` weight, each times the priority, leaving out weights of 0 or less. `-` for a `No` row. | | REASON | For a `No` row, why selection can't choose the runtime. `-` for a `Yes` row. | `Yes` rows come first, in the order OME [ranks them](../matching/runtime-selection-scoring.md#the-ranking-order), so the first `Yes` row is the runtime OME would select. `No` rows follow, ServingRuntimes first, each group by name. WEIGHT looks only at the first matching entry, and leaves out weights of 0 or less. The [score](../matching/runtime-selection-scoring.md#how-the-score-is-computed) OME ranks by takes the runtime's best entry, and counts a weight of 0 as 10 or 5. So WEIGHT equals the score only when the first matching entry gives the score and sets no weight of 0 or less. The command doesn't show the score itself. A `No` row shows the first check the runtime fails, in this order: | Reason | Cause | | --- | --- | | `runtime is disabled` | The runtime sets `disabled: true`. | | `runtime does not support the required accelerator class` | With `--isvc`, the InferenceService asks for an accelerator class the runtime doesn't list. See [Runtime accelerator-class matching](../matching/runtime-accelerator-class-matching.md#where-a-rejection-shows-up). | | `runtime engine deployment mode does not match requested engine deployment mode ` | With `--isvc`, the runtime and the InferenceService both declare a deployment mode for the engine, and the modes differ. For the decoder, the message says `decoder`. See [Runtime deployment-mode matching](../matching/runtime-deployment-mode-matching.md#where-a-rejection-shows-up). | | `model format '