Michael Rabinovich Cursor commited on
Commit ·
0648533
1
Parent(s): fa32cdd
submit: dump full eval/report subprocess output to container log on failure
Browse files
submit.py
CHANGED
|
@@ -688,7 +688,14 @@ def _run_eval(run_dir: Path) -> None:
|
|
| 688 |
check=False,
|
| 689 |
)
|
| 690 |
if proc.returncode != 0:
|
| 691 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 692 |
tail = (proc.stderr or proc.stdout or "")[-500:].strip()
|
| 693 |
raise RuntimeError(
|
| 694 |
f"cadgenbench evaluate exited {proc.returncode}: {tail}"
|
|
@@ -711,6 +718,10 @@ def _run_report(run_dir: Path, html_out: Path) -> None:
|
|
| 711 |
check=False,
|
| 712 |
)
|
| 713 |
if proc.returncode != 0 or not html_out.is_file():
|
|
|
|
|
|
|
|
|
|
|
|
|
| 714 |
tail = (proc.stderr or proc.stdout or "")[-500:].strip()
|
| 715 |
raise RuntimeError(
|
| 716 |
f"cadgenbench report single exited {proc.returncode}: {tail}"
|
|
|
|
| 688 |
check=False,
|
| 689 |
)
|
| 690 |
if proc.returncode != 0:
|
| 691 |
+
# Dump the full subprocess output to the container log so the
|
| 692 |
+
# actual child crash (segfault, OSMesa init error, etc.) is
|
| 693 |
+
# recoverable via the Space's run logs. The user-facing
|
| 694 |
+
# failure_reason field stays short (200 chars cap downstream).
|
| 695 |
+
logger.error(
|
| 696 |
+
"cadgenbench evaluate exited %s\n--- STDERR ---\n%s\n--- STDOUT ---\n%s",
|
| 697 |
+
proc.returncode, proc.stderr or "", proc.stdout or "",
|
| 698 |
+
)
|
| 699 |
tail = (proc.stderr or proc.stdout or "")[-500:].strip()
|
| 700 |
raise RuntimeError(
|
| 701 |
f"cadgenbench evaluate exited {proc.returncode}: {tail}"
|
|
|
|
| 718 |
check=False,
|
| 719 |
)
|
| 720 |
if proc.returncode != 0 or not html_out.is_file():
|
| 721 |
+
logger.error(
|
| 722 |
+
"cadgenbench report single exited %s\n--- STDERR ---\n%s\n--- STDOUT ---\n%s",
|
| 723 |
+
proc.returncode, proc.stderr or "", proc.stdout or "",
|
| 724 |
+
)
|
| 725 |
tail = (proc.stderr or proc.stdout or "")[-500:].strip()
|
| 726 |
raise RuntimeError(
|
| 727 |
f"cadgenbench report single exited {proc.returncode}: {tail}"
|