Repository navigation
Commit 0477e57
feat(cli): auto-discover test_config.json for single eval file in adk eval
Merge #4412
**Problem:**
`adk eval` behavior was inconsistent with the expected config discovery flow.
When `--config_file_path` was omitted, CLI always fell back to default criteria,
instead of using `test_config.json` located next to an eval file. This differs
from `AgentEvaluator.evaluate`, which already discovers a `test_config.json`
sitting next to each test file.
**Solution:**
Added config path resolution in `adk eval`:
- If `--config_file_path` is provided, use it as-is.
- If omitted and input is a single eval file, look for
`<eval_file_dir>/test_config.json`.
- If omitted and input is multiple eval files or eval set IDs, do not
auto-discover and keep default criteria behavior.
If no adjacent `test_config.json` is found, behavior is unchanged and the
built-in default evaluation criteria are used.
This keeps behavior explicit for mixed-directory multi-file runs while enabling
convenient per-file config discovery for single-file usage. Auto-discovery is
intentionally limited to single-file input to avoid ambiguous behavior when
multiple eval files are provided from different directories.
Towards #4410
Co-authored-by: Haran Rajkumar <[email protected]>
PiperOrigin-RevId: 9618638671 parent 4f58306 commit 0477e57
2 files changed
Lines changed: 101 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
1103 | 1130 | | |
1104 | 1131 | | |
1105 | 1132 | | |
| |||
1206 | 1233 | | |
1207 | 1234 | | |
1208 | 1235 | | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | 1236 | | |
1224 | 1237 | | |
1225 | 1238 | | |
| |||
1241 | 1254 | | |
1242 | 1255 | | |
1243 | 1256 | | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
1244 | 1274 | | |
1245 | 1275 | | |
1246 | 1276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
128 | 185 | | |
129 | 186 | | |
130 | 187 | | |
| |||
0 commit comments