Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
a192c95e
"docs/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "98388670d293a590e69d9ff6b442169829f47cf3"
Unverified
Commit
a192c95e
authored
Feb 17, 2023
by
Nicolas Hug
Committed by
GitHub
Feb 17, 2023
Browse files
Remove check_v2_dataset_warnings.py which is failing (#7280)
parent
4774fe3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
25 deletions
+0
-25
.github/workflows/test-linux-cpu.yml
.github/workflows/test-linux-cpu.yml
+0
-6
test/check_v2_dataset_warnings.py
test/check_v2_dataset_warnings.py
+0
-19
No files found.
.github/workflows/test-linux-cpu.yml
View file @
a192c95e
...
...
@@ -55,9 +55,3 @@ jobs:
# Run Tests
python3 -m torch.utils.collect_env
python3 -m pytest --junitxml=test-results/junit.xml -v --durations 20
# Specific test for warnings on "from torchvision.datasets import wrap_dataset_for_transforms_v2"
# We keep them separate to avoid any side effects due to warnings / imports.
# TODO: Remove this and add proper tests (possibly using a sub-process solution as described
# in https://github.com/pytorch/vision/pull/7269).
python3 -m pytest -v test/check_v2_dataset_warnings.py
test/check_v2_dataset_warnings.py
deleted
100644 → 0
View file @
4774fe3a
import
pytest
def
test_warns_if_imported_from_datasets
(
mocker
):
mocker
.
patch
(
"torchvision._WARN_ABOUT_BETA_TRANSFORMS"
,
return_value
=
True
)
import
torchvision
with
pytest
.
warns
(
UserWarning
,
match
=
torchvision
.
_BETA_TRANSFORMS_WARNING
):
from
torchvision.datasets
import
wrap_dataset_for_transforms_v2
assert
callable
(
wrap_dataset_for_transforms_v2
)
@
pytest
.
mark
.
filterwarnings
(
"error"
)
def
test_no_warns_if_imported_from_datasets
():
from
torchvision.datasets
import
wrap_dataset_for_transforms_v2
assert
callable
(
wrap_dataset_for_transforms_v2
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment