Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
c83cec44
"tests/test_modeling_xlnet.py" did not exist on "7e3070ae4f0a1f57a974de9b2b54fd7ad3f08fce"
Unverified
Commit
c83cec44
authored
Oct 29, 2020
by
Stas Bekman
Committed by
GitHub
Oct 29, 2020
Browse files
improve error checking (#8157)
parent
69117628
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/transformers/testing_utils.py
src/transformers/testing_utils.py
+5
-2
No files found.
src/transformers/testing_utils.py
View file @
c83cec44
...
...
@@ -849,7 +849,7 @@ async def _stream_subprocess(cmd, env=None, stdin=None, timeout=None, quiet=Fals
# XXX: the timeout doesn't seem to make any difference here
await
asyncio
.
wait
(
[
_read_stream
(
p
.
stdout
,
lambda
l
:
tee
(
l
,
out
,
sys
.
stdout
)),
_read_stream
(
p
.
stdout
,
lambda
l
:
tee
(
l
,
out
,
sys
.
stdout
,
label
=
"stdout:"
)),
_read_stream
(
p
.
stderr
,
lambda
l
:
tee
(
l
,
err
,
sys
.
stderr
,
label
=
"stderr:"
)),
],
timeout
=
timeout
,
...
...
@@ -869,7 +869,10 @@ def execute_subprocess_async(cmd, env=None, stdin=None, timeout=180, quiet=False
raise
RuntimeError
(
f
"'
{
cmd_str
}
' failed with returncode
{
result
.
returncode
}
- see the `stderr:` messages from above for details."
)
if
not
result
.
stdout
:
# check that the subprocess actually did run and produced some output, should the test rely on
# the remote side to do the testing
if
not
result
.
stdout
and
not
result
.
stderr
:
raise
RuntimeError
(
f
"'
{
cmd_str
}
' produced no output."
)
return
result
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment