Fix ValueError: Missing value for tag key(s): model_name,engine. (#19113)

Signed-off-by: Seiji Eicher <seiji@anyscale.com>
This commit is contained in:
Seiji Eicher
2025-06-04 17:10:45 +08:00
committed by GitHub
parent 8e972d9c44
commit 2669a0d7b5
2 changed files with 14 additions and 1 deletions
+10
View File
@@ -31,6 +31,16 @@ class RayPrometheusMetric:
self.metric.set_default_tags(labelskwargs)
if labels:
if len(labels) != len(self.metric._tag_keys):
raise ValueError(
"Number of labels must match the number of tag keys. "
f"Expected {len(self.metric._tag_keys)}, got {len(labels)}"
)
self.metric.set_default_tags(
dict(zip(self.metric._tag_keys, labels)))
return self