-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update routers to use GetPodModelMetric api and misc cleanup in metri… #590
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,8 +25,8 @@ | |
# Global storage for overridden values | ||
overrides = {} | ||
|
||
MODEL_NAME = os.getenv('MODEL_NAME', 'llama2-70b') | ||
DEPLOYMENT_NAME = os.getenv('DEPLOYMENT_NAME', 'llama2-70b') | ||
MODEL_NAME = os.getenv('MODEL_NAME', 'llama2-7b') | ||
DEPLOYMENT_NAME = os.getenv('DEPLOYMENT_NAME', 'llama2-7b') | ||
NAMESPACE = os.getenv('POD_NAMESPACE', 'default') | ||
DEFAULT_REPLICAS = int(os.getenv('DEFAULT_REPLICAS', '1')) | ||
SIMULATION = os.getenv('SIMULATION', 'disabled') | ||
|
@@ -566,16 +566,19 @@ def metrics(): | |
] | ||
|
||
# Generate all metrics | ||
metrics_output = """ | ||
# HELP vllm:lora_requests_info Running stats on lora requests. | ||
# TYPE vllm:lora_requests_info gauge | ||
vllm:lora_requests_info{max_lora="1",running_lora_adapters="text2sql-lora-1",waiting_lora_adapters=""} 1 | ||
""" | ||
metrics_output = "" | ||
for metric in simple_metrics: | ||
metrics_output += generate_counter_gauge_metric(metric["name"], metric["type"], metric["description"], | ||
model_name, metric["value"]) | ||
metrics_output += generate_counter_gauge_metric(metric["name"], metric["type"], metric["description"], | ||
"lora-1", metric["value"], help_header=False) | ||
"text2sql-lora-1", metric["value"], help_header=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. em. does user register a different name here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is not a blocker for the merge. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure from where lora-1 name came from. I added text2sql lora name based off model adapter. |
||
|
||
|
||
metrics_output += """ | ||
# HELP vllm:lora_requests_info Running stats on lora requests. | ||
# TYPE vllm:lora_requests_info gauge | ||
vllm:lora_requests_info{max_lora="1",running_lora_adapters="text2sql-lora-1",waiting_lora_adapters=""} 1 | ||
""" | ||
|
||
histogram_metrics = [ | ||
{ | ||
|
@@ -663,7 +666,7 @@ def metrics(): | |
histogram_metrics_output += generate_histogram_metric( | ||
metric_name=metric["name"], | ||
description=metric["description"], | ||
model_name="lora-1", | ||
model_name="text2sql-lora-1", | ||
buckets=metric["buckets"], | ||
new_requests=new_requests, | ||
help_header=False | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch. name has been changed. We probably can inject from env using reference later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1