File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -80,22 +80,21 @@ def main() -> None:
8080 print (f"torchvision: { torchvision .__version__ } " )
8181 print (f"torch.cuda.is_available: { torch .cuda .is_available ()} " )
8282
83- if re .match (r"\d+\.\d+\.\d+(?!a0)" , torchvision .__version__ ):
83+ # The "a0" after the semantic version should only be present on the main branch or nightly builds,
84+ # but not release branches.
85+ if re .match (r"\d+\.\d+\.\d+(?!a0)\+" , torchvision .__version__ ):
8486 try :
85- import torchvision . prototype as _
87+ from torchvision import prototype
8688 except ModuleNotFoundError :
8789 pass
8890 else :
8991 raise AssertionError (
9092 "torchvision.prototype available on a release version. "
91- "Run\n \n "
92- "rm -rf torchvision/prototype test/test_prototype* .github/workflows/prototype*"
93+ "Run rm -r torchvision/prototype test/test_prototype* .github/workflows/prototype*"
9394 )
9495
95- major_minor_version = torchvision .__version__ .split ("." )[:2 ]
96- if major_minor_version >= (0 , 16 ):
97- print (f"{ torch .ops .image ._jpeg_version () = } " )
98- assert torch .ops .image ._is_compiled_against_turbo ()
96+ print (f"{ torch .ops .image ._jpeg_version () = } " )
97+ assert torch .ops .image ._is_compiled_against_turbo ()
9998
10099 smoke_test_torchvision ()
101100 smoke_test_torchvision_read_decode ()
You can’t perform that action at this time.
0 commit comments