Skip to content

examples: add kthena.io/model-name annotation to ModelServing samples#871

Open
WHOIM1205 wants to merge 2 commits intovolcano-sh:mainfrom
WHOIM1205:examples/add-model-name-annotation
Open

examples: add kthena.io/model-name annotation to ModelServing samples#871
WHOIM1205 wants to merge 2 commits intovolcano-sh:mainfrom
WHOIM1205:examples/add-model-name-annotation

Conversation

@WHOIM1205
Copy link
Copy Markdown
Contributor

@WHOIM1205 WHOIM1205 commented Apr 7, 2026

Summary

  • Add kthena.io/model-name annotation to ModelServing example manifests
  • Helps map ModelServing resources to the model label in Prometheus metrics

Scope

  • Examples only (no code or behavioral changes)

Test Plan

It introduces annotation-based model mapping in examples and docs.

Signed-off-by: WHOIM1205 <rathourprateek8@gmail.com>
Copilot AI review requested due to automatic review settings April 7, 2026 07:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the kthena.io/model-name annotation to selected ModelServing example manifests to demonstrate the recommended pattern for mapping ModelServing resources to Prometheus metrics. The annotation helps associate a ModelServing resource with its corresponding model label in metrics-based autoscaling scenarios.

Changes:

  • Added kthena.io/model-name annotation to examples/model-serving/sample.yaml and examples/model-serving/data-parallel-deployment.yaml
  • Added the same annotation to the documentation example at docs/kthena/docs/assets/examples/model-serving/sample.yaml
  • Included clarifying comment explaining the annotation's purpose

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
examples/model-serving/sample.yaml Added kthena.io/model-name annotation with value "sample-model"
examples/model-serving/data-parallel-deployment.yaml Added kthena.io/model-name annotation with value "my-model"
docs/kthena/docs/assets/examples/model-serving/sample.yaml Added kthena.io/model-name annotation with value "sample-model" (documentation mirror)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/model-serving/sample.yaml Outdated
Comment on lines +6 to +8
annotations:
# Identifies the model for metrics-based autoscaling (must match Prometheus "model" label).
kthena.io/model-name: "sample-model"
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds the kthena.io/model-name annotation to some ModelServing examples but appears incomplete. Other example files in the same directory lack this annotation: gangPolicy.yaml, gpu-pd-disaggregation.yaml, multi-node.yaml, network-topology.yaml, prefill-decode-disaggregation.yaml, and rollingupdate.yaml. For consistency, all ModelServing example manifests should include this annotation to demonstrate the recommended pattern.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the kthena.io/model-name annotation to several ModelServing example configuration files to enable metrics-based autoscaling. Feedback was provided regarding the consistency of the annotation value with the resource name in the sample.yaml files to maintain clarity across the documentation.

namespace: default
annotations:
# Identifies the model for metrics-based autoscaling (must match Prometheus "model" label).
kthena.io/model-name: "sample-model"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value of the kthena.io/model-name annotation (sample-model) is inconsistent with the resource name (sample). In other examples, such as data-parallel-deployment.yaml, the annotation value matches the resource name. For better clarity and consistency across the documentation and examples, it is recommended to use the resource name as the model name value unless there is a specific reason to demonstrate they can differ.

    kthena.io/model-name: "sample"

Comment thread examples/model-serving/sample.yaml Outdated
namespace: default
annotations:
# Identifies the model for metrics-based autoscaling (must match Prometheus "model" label).
kthena.io/model-name: "sample-model"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The value of the kthena.io/model-name annotation (sample-model) is inconsistent with the resource name (sample). In other examples, such as data-parallel-deployment.yaml, the annotation value matches the resource name. For better clarity and consistency across the documentation and examples, it is recommended to use the resource name as the model name value unless there is a specific reason to demonstrate they can differ.

    kthena.io/model-name: "sample"

@LiZhenCheng9527
Copy link
Copy Markdown
Collaborator

/lgtm

Copy link
Copy Markdown
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait: if this annotation requires user to set, why do we need to add to our docs

@WHOIM1205
Copy link
Copy Markdown
Contributor Author

WHOIM1205 commented Apr 8, 2026

hey @hzxuzhonghu
the idea was just to make the mapping to the prometheus model label visible in examples since autoscaling will depend on it it’s not required just a convention for clarity

@hzxuzhonghu
Copy link
Copy Markdown
Member

So actually it can be any label key, right? Please only add the label when you document autosclaing example.

…mples

Signed-off-by: WHOIM1205 <rathourprateek8@gmail.com>
@volcano-sh-bot
Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@volcano-sh-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@WHOIM1205
Copy link
Copy Markdown
Contributor Author

hey @hzxuzhonghu
Updated the PR based on feedback removed the annotation from examples for now will introduce it later along with autoscaling support

@LiZhenCheng9527
Copy link
Copy Markdown
Collaborator

Will there be any further updates to this PR?

@WHOIM1205
Copy link
Copy Markdown
Contributor Author

Will there be any further updates to this PR?

no further updates planned for this pr

this was part of an earlier approach but based on feedback i moved away from adding annotations directly

ive opened a new pr with the updated direction focusing on autoscaling example using user defined labels

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants