matrix: a run of some legs is timed against the note's other GPUs; untested suites show their exit
The cross-GPU time rule took its median from the run's own GPU legs, so `run --legs` of one GPU had fewer than three and never judged time. The median now takes every GPU leg of the sha's note, with each leg's base, and only the legs of this run are judged. The harness suite counts no tests, so its verdict read "harness 0/0"; a suite that ran no test now shows its exit code. Verified: unittest of scripts/matrix passes; `show 73e0af4b66` prints the new form.
This commit is contained in:
1 parent
c8321149f7
commit
248d41074f
2 files changed
+16
-6
No files matched your search
+14
-5
@@ -607,12 +607,21 @@ def run_cmd(sha, only, dry):
|
||||
finally:
|
||||
run.cleanup()
|
||||
entries = {leg.id: leg_entry(run, leg) for leg in legs}
|
||||
gpu = {k: e for k, e in entries.items() if e["gpu"]}
|
||||
for leg_id, problems in results.time_outliers(
|
||||
{k: e["records"]["time"] for k, e in gpu.items()},
|
||||
{k: (e["base_records"] or {}).get("time", {}) for k, e in gpu.items()}).items():
|
||||
entries[leg_id]["problems"] += problems
|
||||
doc = note(sha) or dict(sha=sha, runs=[], legs={})
|
||||
# The cross-GPU median takes every GPU leg of the note, so a run of some legs (--legs) is
|
||||
# judged against the GPUs it did not run again; only this run's legs are judged.
|
||||
times, bases = {}, {}
|
||||
for leg_id, e in doc["legs"].items():
|
||||
if e.get("gpu") and leg_id not in entries:
|
||||
times[leg_id] = e["records"]["time"]
|
||||
bases[leg_id] = ((base_of(sha, leg_id)[1] or {}).get("records") or {}).get("time", {})
|
||||
for leg_id, e in entries.items():
|
||||
if e["gpu"]:
|
||||
times[leg_id] = e["records"]["time"]
|
||||
bases[leg_id] = (e["base_records"] or {}).get("time", {})
|
||||
for leg_id, problems in results.time_outliers(times, bases).items():
|
||||
if leg_id in entries:
|
||||
entries[leg_id]["problems"] += problems
|
||||
for leg_id, e in entries.items():
|
||||
e.pop("base_records")
|
||||
e["verdict"] = "fail" if e["problems"] else "pass"
|
||||
|
||||
@@ -174,7 +174,8 @@ def time_outliers(times, bases):
|
||||
|
||||
def verdict_line(leg_id, leg):
|
||||
"""The one line `run` and `show` print for a leg of a note."""
|
||||
tests = ", ".join(f"{name} {s['passed']}/{s['run']}" for name, s in leg.get("suites", {}).items())
|
||||
tests = ", ".join(f"{name} {s['passed']}/{s['run']}" if s["run"] else f"{name} exit {s['exit']}"
|
||||
for name, s in leg.get("suites", {}).items())
|
||||
counted = sum(len(values) for values in leg.get("records", {}).values())
|
||||
where = " ".join(part for part in (leg.get("device"), leg.get("driver")) if part)
|
||||
head = f"{'PASS' if leg['verdict'] == 'pass' else 'FAIL'} {leg_id:10} {where or '?'} on {leg.get('node', '?')}"
|
||||
|
||||
Reference in new issue
Block a user