Skip to content

Commit 971c638

Browse files
authored
forward the worker stderr to the parent process (#8262)
1 parent eb6313e commit 971c638

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/transformers/testing_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,8 +896,10 @@ def execute_subprocess_async(cmd, env=None, stdin=None, timeout=180, quiet=False
896896

897897
cmd_str = " ".join(cmd)
898898
if result.returncode > 0:
899+
stderr = "\n".join(result.stderr)
899900
raise RuntimeError(
900-
f"'{cmd_str}' failed with returncode {result.returncode} - see the `stderr:` messages from above for details."
901+
f"'{cmd_str}' failed with returncode {result.returncode}\n\n"
902+
f"The combined stderr from workers follows:\n{stderr}"
901903
)
902904

903905
# check that the subprocess actually did run and produced some output, should the test rely on

0 commit comments

Comments
 (0)