Skip to content

Commit

Permalink
forward the worker stderr to the parent process (#8262)
Browse files Browse the repository at this point in the history
  • Loading branch information
stas00 authored Nov 3, 2020
1 parent eb6313e commit 971c638
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/transformers/testing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,8 +896,10 @@ def execute_subprocess_async(cmd, env=None, stdin=None, timeout=180, quiet=False

cmd_str = " ".join(cmd)
if result.returncode > 0:
stderr = "\n".join(result.stderr)
raise RuntimeError(
f"'{cmd_str}' failed with returncode {result.returncode} - see the `stderr:` messages from above for details."
f"'{cmd_str}' failed with returncode {result.returncode}\n\n"
f"The combined stderr from workers follows:\n{stderr}"
)

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

0 comments on commit 971c638

Please sign in to comment.