We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e5ed92 commit f730d28Copy full SHA for f730d28
src/vllm_judge/judge.py
@@ -103,6 +103,9 @@ async def evaluate(
103
MetricNotFoundError: If metric name not found
104
ParseError: If unable to parse model response
105
"""
106
+ if metric and isinstance(metric, str):
107
+ metric: Metric = self.get_metric(metric)
108
+
109
# Handle model-specific metrics
110
if isinstance(metric, ModelSpecificMetric):
111
if isinstance(content, dict):
@@ -139,8 +142,6 @@ async def evaluate(
139
142
metric_template_vars = {}
140
143
141
144
if metric:
- if isinstance(metric, str):
- metric = self.get_metric(metric)
145
# Use metric defaults but allow overrides
146
criteria = criteria or metric.criteria
147
rubric = rubric or metric.rubric
0 commit comments