Skip to content

Commit a6b5244

Browse files
Jacksunweicopybara-github
authored andcommitted
fix: model_config is misplaced for EvalMetricResultPerInvocation.
PiperOrigin-RevId: 763648920
1 parent b576689 commit a6b5244

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/google/adk/evaluation/eval_metrics.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,19 @@ class EvalMetricResult(EvalMetric):
5151
alias_generator=alias_generators.to_camel,
5252
populate_by_name=True,
5353
)
54-
model_config = ConfigDict(
55-
alias_generator=alias_generators.to_camel,
56-
populate_by_name=True,
57-
)
54+
5855
score: Optional[float] = None
5956
eval_status: EvalStatus
6057

6158

6259
class EvalMetricResultPerInvocation(BaseModel):
6360
"""Eval metric results per invocation."""
6461

62+
model_config = ConfigDict(
63+
alias_generator=alias_generators.to_camel,
64+
populate_by_name=True,
65+
)
66+
6567
actual_invocation: Invocation
6668
"""The actual invocation, usually obtained by inferencing the agent."""
6769

0 commit comments

Comments
 (0)