Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torchhub tests are not run in CI #7398

Closed
pmeier opened this issue Mar 8, 2023 · 0 comments · Fixed by #7399
Closed

torchhub tests are not run in CI #7398

pmeier opened this issue Mar 8, 2023 · 0 comments · Fixed by #7399

Comments

@pmeier
Copy link
Collaborator

pmeier commented Mar 8, 2023

For example https://app.circleci.com/pipelines/github/pytorch/vision/23876/workflows/d96da5f3-9ca0-4615-9c08-0373c00233a0/jobs/1849866?invite=true#step-105-10

The problem is that we skip in case

@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

import torchvision
torchvision.disable_beta_transforms_warning()

and implicitly in

from common_utils import CUDA_NOT_AVAILABLE_MSG, IN_FBCODE, IN_OSS_CI, IN_RE_WORKER, OSS_CI_GPU_NO_CUDA_MSG

for example

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:

https://app.circleci.com/pipelines/github/pytorch/vision/9847/workflows/813b8bbf-7aa4-4a84-b3ab-2b453035c206/jobs/735233?invite=true#step-102-64

We should really not just skip in such cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant