Repository navigation
Commit 39c8cfa
feat(cli): Support
Merge #4411
**Problem:**
`adk eval` did not support repeated runs, so users had to use external loops to
reduce nondeterminism. Also, when adding multi-run support, reporting needs to
stay consistent between summary and detailed output.
**Solution:**
Added `--num_runs` to `adk eval` (default: `1`, min: `1`) and wired it into
inference execution so each eval set can be run multiple times in a single CLI
invocation.
For reporting:
- Summary is aggregated per eval case (`eval_set_id` + `eval_id`) across runs.
- Detailed output (`--print_detailed_results`) keeps per-run details (each run's
`EvalCaseResult`) to avoid mismatches between aggregated scores and
invocation-level debugging info.
Also added unit tests for:
- Aggregation behavior across runs.
- CLI validation for invalid `--num_runs` values.
- Multi-run summary aggregation and detailed per-run printing behavior.
Related: #4410
Co-authored-by: Haran Rajkumar <[email protected]>
PiperOrigin-RevId: 959841339adk eval --num_runs N as AgentEvaluator1 parent a5864a0 commit 39c8cfa
4 files changed
Lines changed: 355 additions & 2 deletions
File tree
- src/google/adk/cli
- tests/unittests/cli/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
164 | 168 | | |
165 | 169 | | |
166 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
167 | 261 | | |
168 | 262 | | |
169 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1110 | 1110 | | |
1111 | 1111 | | |
1112 | 1112 | | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
1113 | 1120 | | |
1114 | 1121 | | |
1115 | 1122 | | |
| |||
1125 | 1132 | | |
1126 | 1133 | | |
1127 | 1134 | | |
| 1135 | + | |
1128 | 1136 | | |
1129 | 1137 | | |
1130 | 1138 | | |
| |||
1178 | 1186 | | |
1179 | 1187 | | |
1180 | 1188 | | |
| 1189 | + | |
| 1190 | + | |
1181 | 1191 | | |
1182 | 1192 | | |
1183 | 1193 | | |
| |||
1200 | 1210 | | |
1201 | 1211 | | |
1202 | 1212 | | |
| 1213 | + | |
1203 | 1214 | | |
1204 | 1215 | | |
1205 | 1216 | | |
| |||
1315 | 1326 | | |
1316 | 1327 | | |
1317 | 1328 | | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
1318 | 1333 | | |
1319 | 1334 | | |
1320 | | - | |
| 1335 | + | |
| 1336 | + | |
1321 | 1337 | | |
1322 | 1338 | | |
1323 | 1339 | | |
| |||
1327 | 1343 | | |
1328 | 1344 | | |
1329 | 1345 | | |
| 1346 | + | |
1330 | 1347 | | |
1331 | 1348 | | |
1332 | 1349 | | |
| |||
1335 | 1352 | | |
1336 | 1353 | | |
1337 | 1354 | | |
1338 | | - | |
| 1355 | + | |
1339 | 1356 | | |
1340 | 1357 | | |
1341 | 1358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
261 | 265 | | |
262 | 266 | | |
263 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
0 commit comments