Run one task's native-vs-wrapped comparison in a fresh subprocess.
(task_name: str, *, steps: int, seed: int)
| 120 | |
| 121 | |
| 122 | def check_task(task_name: str, *, steps: int, seed: int) -> dict: |
| 123 | """Run one task's native-vs-wrapped comparison in a fresh subprocess.""" |
| 124 | proc = subprocess.run( |
| 125 | [sys.executable, "-c", _WORKER, task_name, str(seed), str(steps)], |
| 126 | check=False, |
| 127 | capture_output=True, |
| 128 | text=True, |
| 129 | ) |
| 130 | for line in proc.stdout.splitlines(): |
| 131 | if line.startswith("RESULT_B64:"): |
| 132 | return json.loads(base64.b64decode(line[len("RESULT_B64:") :]).decode()) |
| 133 | return {"task": task_name, "parity_1to1": False, "error": proc.stderr[-2000:]} |
| 134 | |
| 135 | |
| 136 | def main() -> None: |