Skip to content

fix bug in assertNotEqual for int tensors #25412

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

Closed
wants to merge 2 commits into from

Conversation

nairbv
Copy link
Collaborator

@nairbv nairbv commented Aug 29, 2019

re-apply: #25199
but without a failing quantized test

@pytorchbot pytorchbot added module: operators module: tests Issues related to tests (not the torch.testing module) labels Aug 29, 2019
@@ -235,7 +235,8 @@ def test_qtensor_view(self):
self.assertEqual(b.size(), c.size())
self.assertEqual(b.q_scale(), c.q_scale())
self.assertEqual(b.q_zero_point(), c.q_zero_point())
self.assertNotEqual(b.int_repr(), c.int_repr())
# TODO: fix flaky test
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was an issue filed for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed with @jerryzh168 who I believe is currently fixing. I'm anticipating that I may be merging his fix before landing this, depending how quick he is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need to comment the asserts in test_qtensor_reshape as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe? I couldn't get it to fail on my dev server so was waiting to see again in this CI build.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked again and these should be correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugh, unfortunately reshape did fail

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, then please rebase on my pr #25429

@nairbv nairbv requested a review from jerryzh168 August 29, 2019 19:35
@nairbv
Copy link
Collaborator Author

nairbv commented Aug 29, 2019

reshape also failed, from ci log:

Aug 29 21:19:34 ======================================================================
Aug 29 21:19:34 FAIL: test_qtensor_reshape (__main__.TestQuantizedTensor)
Aug 29 21:19:34 ----------------------------------------------------------------------
Aug 29 21:19:34 Traceback (most recent call last):
Aug 29 21:19:34   File "test_quantized_tensor.py", line 267, in test_qtensor_reshape
Aug 29 21:19:34     self.assertNotEqual(b.int_repr(), c.int_repr())
Aug 29 21:19:34   File "/var/lib/jenkins/workspace/test/common_utils.py", line 737, in assertNotEqual
Aug 29 21:19:34     self.assertGreaterEqual(max_err, prec, message)
Aug 29 21:19:34 AssertionError: 0 not greater than or equal to 1e-05 : 

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nairbv is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@nairbv merged this pull request in f0c6021.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged module: tests Issues related to tests (not the torch.testing module)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants