-
Notifications
You must be signed in to change notification settings - Fork 610
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
Dense Image Warp tests are flaky #138
Comments
Seems that the behavior of |
Okay, I find that the following script also fails in tf 2.0.0-dev20190403 on my machine. CC @tomerk for visibility. import tensorflow as tf
from tensorflow.python.framework import test_util
@tf.function
def foo(x):
tf.debugging.assert_greater_equal(x.shape[0], 2, message="fail")
y = x[1]
return y
class TestAssert(tf.test.TestCase):
def test_assert(self):
with self.assertRaisesRegexp(tf.errors.InvalidArgumentError, "fail"):
self.evaluate(foo(tf.random.uniform(shape=(1, 2, 3))))
if __name__ == "__main__":
tf.test.main() |
@WindQAQ So while this does look like a bug... is there any reason we need to be using |
The checks are all about shape inference. If |
Could we try a PR that uses just |
Sure, I'll create a PR in one or two days :-) |
In the latest docker image (tf==2.0.0-dev20190405), I find that the error is caused by |
@WindQAQ one more is failing now, sorry it was not failing earlier:
|
@armando-fandango I cannot reproduce this error now. Is this on the CI build or your local machine? Thanks! @seanpmorgan Hi Sean, I'd suppose it is not easy due to import tensorflow as tf
@tf.function
def foo(x):
if tf.shape(x)[0] < 3:
raise ValueError("fail")
return x[2]
for shape in [[1, 1, 1], [2, 2, 2], [3, 3, 3]]:
try:
foo(tf.random.uniform(shape=shape))
except ValueError:
print(shape)
for shape in [[3, 3, 3], [2, 2, 2], [1, 1, 1]]:
try:
foo(tf.random.uniform(shape=shape))
except ValueError:
print(shape)
'''
output:
[1, 1, 1]
[2, 2, 2]
[3, 3, 3]
[3, 3, 3]
[2, 2, 2]
[1, 1, 1]
''' |
This is on latest custom-ops container with master branch. I have two macbooks, and it fails only on one of them. |
Do we need to add make clean in case something is getting cached ? |
It's weird. Seems that the behavior varies from machine to machine. I think another workaround is not to use |
Yeah so I believe it'll fail on every machine with enough runs. I'm fine with a removal of tf.function for the time being... but we should look into a removal of tf.debugging as a long term fix |
Hmmm tests appear to be passing repeatedly. Possible there has been an upstream fix... such is life building against an alpha release. Closing, but happy to re-open if we see issues again. |
Welp... too quick on calling that (nightly fail). We should either remove tf.debugging or remove the tf.funcion decorator |
You should be able to use |
I don't think you need |
Recently we've seen that #53 is causing flaky failures in the CI. See:
https://source.cloud.google.com/results/invocations/8f31faef-505a-440e-b75f-e6edf1071269/targets/tensorflow_addons%2Fubuntu%2Fgpu%2Fpy3%2Fpresubmit/log
Do you mind taking a look when time allows @WindQAQ ?
The text was updated successfully, but these errors were encountered: