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
OpenDAS
vision
Commits
d9633fc9
Unverified
Commit
d9633fc9
authored
Jun 25, 2021
by
Nicolas Hug
Committed by
GitHub
Jun 25, 2021
Browse files
Fix failing tests by catching the proper exception from torch.testing (#4121)
parent
b3b51377
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
test/test_models.py
test/test_models.py
+1
-1
No files found.
test/test_models.py
View file @
d9633fc9
...
...
@@ -108,7 +108,7 @@ def _check_jit_scriptable(nn_module, args, unwrapper=None, skip=False):
tol
=
3e-4
try
:
torch
.
testing
.
assert_close
(
results
,
results_from_imported
,
atol
=
tol
,
rtol
=
tol
)
except
pytest
.
UsageError
:
except
torch
.
testing
.
_asserts
.
UsageError
:
# custom check for the models that return named tuples:
# we compare field by field while ignoring None as assert_close can't handle None
for
a
,
b
in
zip
(
results
,
results_from_imported
):
...
...
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