Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ def smoke_test_torchvision_read_decode() -> None:
if img_png.ndim != 3 or img_png.numel() < 100:
raise RuntimeError(f"Unexpected shape of img_png: {img_png.shape}")


Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are drive-bys from pre-commit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, they come from #7359.

def smoke_test_compile() -> None:
model = resnet50().cuda()
model = torch.compile(model)
x = torch.randn(1, 3, 224, 224, device="cuda")
out = model(x)
print(f"torch.compile model output: {out.shape}")


def smoke_test_torchvision_resnet50_classify(device: str = "cpu") -> None:
img = read_image(str(SCRIPT_DIR / ".." / "gallery" / "assets" / "dog2.jpg")).to(device)

Expand Down Expand Up @@ -73,6 +75,5 @@ def main() -> None:
smoke_test_torchvision_resnet50_classify("mps")



if __name__ == "__main__":
main()
2 changes: 2 additions & 0 deletions test/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import random
import re
import sys
import textwrap
import warnings
from functools import partial
Expand Down Expand Up @@ -2268,6 +2269,7 @@ def test_random_grayscale_with_grayscale_input():


# TODO: remove in 0.17 when we can delete functional_pil.py and functional_tensor.py
@pytest.mark.xfail(sys.version_info[:2] == (3, 10), reason="See #7372")
@pytest.mark.parametrize(
"import_statement",
(
Expand Down
3 changes: 3 additions & 0 deletions test/test_transforms_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pathlib
import random
import re
import sys
import textwrap
import warnings
from collections import defaultdict
Expand Down Expand Up @@ -2087,6 +2088,7 @@ def test_sanitize_bounding_boxes_errors():
transforms.SanitizeBoundingBox()(different_sizes)


@pytest.mark.xfail(sys.version_info[:2] == (3, 10), reason="See #7372")
@pytest.mark.parametrize(
"import_statement",
(
Expand Down Expand Up @@ -2120,6 +2122,7 @@ def test_warnings_v2_namespaces(import_statement, call_disable_warning):
assert_run_python_script(textwrap.dedent(source))


@pytest.mark.xfail(sys.version_info[:2] == (3, 10), reason="See #7372")
def test_no_warnings_v1_namespace():
source = """
import warnings
Expand Down