run_benchmarks: the 5-row smoke also verifies PRIMARY_METRIC against real results keys, so a wrong metric name cannot survive to the full columns
Browse files- eval/run_benchmarks.py +11 -1
eval/run_benchmarks.py
CHANGED
|
@@ -305,7 +305,17 @@ def main():
|
|
| 305 |
smoke[t] = {"rc": rc, "rows": harvest(os.path.join(root, "smoke"), t).get("rows", {}),
|
| 306 |
"cmd": cmd}
|
| 307 |
print("SMOKE %s rc %s rows %d" % (t, rc, len(smoke[t]["rows"])), flush=True)
|
| 308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
print("SMOKE_PASS" if not bad else "SMOKE_FAIL " + str(bad), flush=True)
|
| 310 |
if bad or a.smoke_only:
|
| 311 |
json.dump(smoke, open(os.path.join(root, "smoke.json"), "w"), indent=1, default=str)
|
|
|
|
| 305 |
smoke[t] = {"rc": rc, "rows": harvest(os.path.join(root, "smoke"), t).get("rows", {}),
|
| 306 |
"cmd": cmd}
|
| 307 |
print("SMOKE %s rc %s rows %d" % (t, rc, len(smoke[t]["rows"])), flush=True)
|
| 308 |
+
# The smoke pass is also where the pre-registered metric name gets checked. PRIMARY_METRIC could not
|
| 309 |
+
# be verified from the pinned YAMLs -- reading a task config gives the metric *name* (`acc`) but the
|
| 310 |
+
# results key is `<name>,<aggregation>` and the aggregation half of that chain is not settled by the
|
| 311 |
+
# config files (E-049) -- so the alternative to checking here is discovering it after the six-hour
|
| 312 |
+
# columns have run. The metric must not be chosen then; the fix is the constant, not the row.
|
| 313 |
+
bad = [t for t in TASKS if smoke[t]["rc"] != 0 or not smoke[t]["rows"]
|
| 314 |
+
or PRIMARY_METRIC[t] not in smoke[t]["rows"]]
|
| 315 |
+
for t in TASKS:
|
| 316 |
+
if PRIMARY_METRIC[t] not in smoke[t]["rows"] and smoke[t]["rows"]:
|
| 317 |
+
print("SMOKE %s metric %r absent; keys are %s" % (
|
| 318 |
+
t, PRIMARY_METRIC[t], sorted(smoke[t]["rows"])[:10]), flush=True)
|
| 319 |
print("SMOKE_PASS" if not bad else "SMOKE_FAIL " + str(bad), flush=True)
|
| 320 |
if bad or a.smoke_only:
|
| 321 |
json.dump(smoke, open(os.path.join(root, "smoke.json"), "w"), indent=1, default=str)
|