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
498b9c86
Unverified
Commit
498b9c86
authored
Aug 15, 2023
by
Andrey Talman
Committed by
GitHub
Aug 15, 2023
Browse files
Fix torchvision test for release (#7833)
Co-authored-by:
Nicolas Hug
<
contact@nicolas-hug.com
>
parent
f4f685dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
test/smoke_test.py
test/smoke_test.py
+7
-2
No files found.
test/smoke_test.py
View file @
498b9c86
...
@@ -78,8 +78,13 @@ def smoke_test_torchvision_resnet50_classify(device: str = "cpu") -> None:
...
@@ -78,8 +78,13 @@ def smoke_test_torchvision_resnet50_classify(device: str = "cpu") -> None:
def
main
()
->
None
:
def
main
()
->
None
:
print
(
f
"torchvision:
{
torchvision
.
__version__
}
"
)
print
(
f
"torchvision:
{
torchvision
.
__version__
}
"
)
print
(
f
"torch.cuda.is_available:
{
torch
.
cuda
.
is_available
()
}
"
)
print
(
f
"torch.cuda.is_available:
{
torch
.
cuda
.
is_available
()
}
"
)
print
(
f
"
{
torch
.
ops
.
image
.
_jpeg_version
()
=
}
"
)
assert
torch
.
ops
.
image
.
_is_compiled_against_turbo
()
# Turn 1.11.0aHASH into 1.11 (major.minor only)
version
=
"."
.
join
(
torchvision
.
__version__
.
split
(
"."
)[:
2
])
if
version
>=
"0.16"
:
print
(
f
"
{
torch
.
ops
.
image
.
_jpeg_version
()
=
}
"
)
assert
torch
.
ops
.
image
.
_is_compiled_against_turbo
()
smoke_test_torchvision
()
smoke_test_torchvision
()
smoke_test_torchvision_read_decode
()
smoke_test_torchvision_read_decode
()
smoke_test_torchvision_resnet50_classify
()
smoke_test_torchvision_resnet50_classify
()
...
...
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