-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed
Labels
Description
The problem is that we skip in case
Line 20 in 5850f37
@pytest.mark.skipif("torchvision" in sys.modules, reason="TestHub must start without torchvision imported") |
but we do that on multiple occasions during collection. The newest examples are
Lines 6 to 9 in 5850f37
import torchvision | |
torchvision.disable_beta_transforms_warning() |
and implicitly in
Line 11 in 5850f37
from common_utils import CUDA_NOT_AVAILABLE_MSG, IN_FBCODE, IN_OSS_CI, IN_RE_WORKER, OSS_CI_GPU_NO_CUDA_MSG |
for example
Lines 25 to 28 in 5850f37
from torch.testing._comparison import BooleanPair, NonePair, not_close_error_metas, NumberPair, TensorLikePair | |
from torchvision import datapoints, io | |
from torchvision.transforms._functional_tensor import _max_value as get_max_value | |
from torchvision.transforms.v2.functional import convert_dtype_image_tensor, to_image_tensor |
This is not new after the v2 port though. It goes all the way back to the combination of #4025 and #4280. The former introduced the import of common_utils
in conftest
while the latter introduced a torchvision
import in common_utils
. Meaning, we haven't been running our torchhub tests for roughly 1.5 years now:
We should really not just skip in such cases.