From 4933efdb487d0eafcc3ade9caedb0fcd542f7b48 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Fri, 10 Apr 2026 12:07:01 +0100 Subject: [PATCH] Cap script timeout at 60s and enable live streaming output 60s per-script cap stops hung scripts (e.g. subhalo/sensitivity) from blocking a full mega-run. Removing the post-run stdout/stderr dumps keeps console output to one concise line per script, and setting PYTHONUNBUFFERED in run_all.py ensures those lines land live in the terminal instead of being block-buffered through the pipe. Co-Authored-By: Claude Opus 4.6 --- autobuild/build_util.py | 8 +------- autobuild/run_all.py | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/autobuild/build_util.py b/autobuild/build_util.py index 1bb94eb4..2d3e7cd1 100644 --- a/autobuild/build_util.py +++ b/autobuild/build_util.py @@ -9,7 +9,7 @@ from pathlib import Path from typing import List -TIMEOUT_SECS = 36000 +TIMEOUT_SECS = 60 BUILD_PATH = Path(__file__).parent BUILD_PYTHON_INTERPRETER = os.environ.get("BUILD_PYTHON_INTERPRETER", "python3") @@ -97,9 +97,6 @@ def execute_notebook(f, report=None, env=None): text=True, env=env, ) - print(result.stdout) - if result.stderr: - print(result.stderr, file=sys.stderr) else: subprocess.run( ["jupyter", "nbconvert", "--to", "notebook", "--execute", "--output", f, f], @@ -221,9 +218,6 @@ def execute_script(f, report=None, env=None): text=True, env=env, ) - print(result.stdout) - if result.stderr: - print(result.stderr, file=sys.stderr) else: subprocess.run( args, diff --git a/autobuild/run_all.py b/autobuild/run_all.py index 11af2e3b..72a4e54c 100644 --- a/autobuild/run_all.py +++ b/autobuild/run_all.py @@ -58,6 +58,7 @@ def run_workspace(name, workspace_dir, project, results_dir, python): import os env = os.environ.copy() env["BUILD_PYTHON_INTERPRETER"] = python + env["PYTHONUNBUFFERED"] = "1" for directory in directories: print(f"\n Running {name} / scripts/{directory} ...")