Skip to content
Open
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions test/smoke_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Run smoke tests"""

import re
import sys
from pathlib import Path

Expand Down Expand Up @@ -79,6 +80,18 @@ def main() -> None:
print(f"torchvision: {torchvision.__version__}")
print(f"torch.cuda.is_available: {torch.cuda.is_available()}")

if re.match(r"\d+\.\d+\.\d+(?!a0)", torchvision.__version__):
try:
import torchvision.prototype as _
except ModuleNotFoundError:
pass
else:
raise AssertionError(
"torchvision.prototype available on a release version. "
"Run\n\n"
"rm -rf torchvision/prototype test/test_prototype* .github/workflows/prototype*"
)

# Turn 1.11.0aHASH into 1.11 (major.minor only)
version = ".".join(torchvision.__version__.split(".")[:2])
if version >= "0.16":
Expand Down