强化学习第二版
This commit is contained in:
@@ -94,6 +94,9 @@ def main(argv=None) -> int:
|
||||
for row in rows]
|
||||
cleared = all(row["rl"]["all_cleared"] and row[baseline]["all_cleared"]
|
||||
for row in rows)
|
||||
valid = all(part['completed'] and part['all_cleared'] and part['correct_absence']
|
||||
and part['normal_exit'] and not part['anomalies'] and not part['timing_mismatches']
|
||||
for row in rows for part in (row[baseline],row['rl']))
|
||||
report[key + "_summary"] = {
|
||||
"mean_virtual_s": {
|
||||
baseline: statistics.mean(row[baseline]["virtual_time_s"] for row in rows),
|
||||
@@ -107,6 +110,7 @@ def main(argv=None) -> int:
|
||||
"rl": statistics.mean(row["rl"]["measures"] for row in rows),
|
||||
},
|
||||
"all_cleared": cleared,
|
||||
"all_valid": valid,
|
||||
}
|
||||
output = Path(args.output)
|
||||
output.parent.mkdir(parents=True, exist_ok=True)
|
||||
@@ -116,7 +120,7 @@ def main(argv=None) -> int:
|
||||
"q3": report["q3_summary"],
|
||||
"q4": report["q4_summary"]},
|
||||
ensure_ascii=False, indent=2))
|
||||
return 0
|
||||
return 0 if report['q3_summary']['all_valid'] and report['q4_summary']['all_valid'] else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user