-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add warnings checks for v2 namespaces #7288
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor comments inline. Instead of scattering these tests in multiple files, should we maybe put them all into test_namespaces.py
or the like?
|
||
|
||
torchvision.disable_beta_transforms_warning() | ||
|
||
from common_utils import CUDA_NOT_AVAILABLE_MSG, IN_FBCODE, IN_OSS_CI, IN_RE_WORKER, OSS_CI_GPU_NO_CUDA_MSG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you add this for #7265 or because we actually need it for these tests. I'm not against it, but want to make sure I understand correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Philip Meier <[email protected]>
I put the v2-related test in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah after the duplicate removal, it looks a lot nicer. Especially since we will have all tests in a single file after 0.17. Thanks Nicolas!
), | ||
) | ||
@pytest.mark.parametrize("from_private", (True, False)) | ||
def test_functional_deprecation_warning(import_statement, from_private): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize this is slightly overkill, we don't need assert_run_python_script
to check the warnings of the deprecated (public) files, we could just use a normal test. But we kinda still need it to properly check the lack of warnings for the now private files, so I mixed both. The whole thing will be removed soon anyway.
) Co-authored-by: Philip Meier <[email protected]>
…7288) Summary: Co-authored-by: Philip Meier <[email protected]> Reviewed By: vmoens Differential Revision: D44416588 fbshipit-source-id: 745e518fcca11abee87de3ced91571206c2e13fb
This PR adds tests related to warnings we raise in the v2 namespaces (transforms, datapoints, dataset wrapper). Also added import tests related to the deprecated
function_pil
andfunctiona_tensor
modulescc @vfdev-5 @pmeier