-
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
Group G,Group D #3981
Group G,Group D #3981
Conversation
test_five_crop test_ten_crop test_max_value test_linear_transformation test_autoaugment test_center_crop test_center_crop_2 test_color_jitter
PR for :#3945 |
Thanks @harishsdev , there are failures, some of theme being undefined names: https://app.circleci.com/pipelines/github/pytorch/vision/8695/workflows/230c01ae-5eaa-4a88-9d4e-e480d9be8dfc/jobs/631032 Did you manage to run the tests locally? |
@NicolasHug Thanks for your support,I'm able run tests in my local PC,I found no error there, Please help to resolve below error assertEqual(output_pil.size()[1:3], crop_size, test/test_transforms.py:1948: NameError |
My doubt is how to write assertEqual for formating expression! |
There's probably something wrong then because otherwise you would have gotten the same issue as above. did you run
you can juste write |
one function is failing as per my observation pytest test/test_transforms.py -vvv -k test_five_crop-passed |
Group G,Group D PR for #3945 |
@NicolasHug please give me inputs if any further modifications required |
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.
Thanks @harishsdev , we can parametrize a bit further but this looks quite good already
test/test_transforms.py
Outdated
|
||
|
||
def test_max_value(): | ||
for dtype in int_dtypes(): |
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.
we could parametrize over dtype here
test/test_transforms.py
Outdated
to_pil_image = transforms.ToPILImage() | ||
h = random.randint(5, 25) | ||
w = random.randint(5, 25) | ||
for single_dim in [True, False]: |
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.
we can parametrize over single_dim
test/test_transforms.py
Outdated
crop_size_delta = [-2 * delta, -delta, 0, delta, 2 * delta] | ||
crop_size_params = itertools.product(input_image_sizes, crop_size_delta, crop_size_delta) | ||
|
||
for (input_image_size, delta_height, delta_width) in crop_size_params: |
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.
let's parametrize over these 3 variables as well.
test/test_transforms.py
Outdated
even_image_size = (random.randint(10, 32) * 2, random.randint(10, 32) * 2) | ||
odd_image_size = (even_image_size[0] + 1, even_image_size[1] + 1) |
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.
to parametrize over input_images_sizes
and preserve the current logic, we can do something like:
@pytest.mark.parametrize('odd_size', (True, False))
def test_center_crop_2(odd_size, ...):
input_image_size = (random.randint(10, 32) * 2, random.randint(10, 32) * 2)
if odd_size:
input_image_size = (input_image_size[0] + 1, input_image_size[1] + 1)
(myenv) PS D:\contrib\19283975\exp\vision> pytest test/test_transforms.py -vvv -k test_five_crop ========================================================== ERRORS =========================================================== -- Docs: https://docs.pytest.org/en/stable/warnings.html |
I already replied to you about this issue here: #3975 (comment) |
@NicolasHug Looks like all the tests passed finally,Can you please help me to merge this change |
Thanks @harishsdev , I took care of the prameterization of test_center_crop_2. I'll merge when green |
Reviewed By: fmassa Differential Revision: D29097722 fbshipit-source-id: e3d32e0e95465aafd474ba300cf21e2b863ad320
test_five_crop
test_ten_crop
test_max_value
test_linear_transformation
test_autoaugment
test_center_crop
test_center_crop_2
test_color_jitter