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
Autograph decorated functions with tf.map_fn #39541
Autograph decorated functions with tf.map_fn #39541
Conversation
Mhh.. why test Is passing? |
I think the issue was fixed a while ago (either in 2.0 or in newer versions, not sure), but the issue ID was never tagged by the fix. I definitely expect the test to pass. Have you seen recent cases when it doesn't work? |
We had problems yesterday with 2.2.0 see tensorflow/addons#1830 (comment) and the colab in that ticket. |
And also with |
I see. Do you have a small reproducer in a colab, using @tf.function as decorator? Something simple like this test would do. It might be caused by keyword arguments, if I read through the comments correctly. |
|
I don't think that's caused by A workaround is to wrap the target of map_fn in tf.function:
|
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 put this test in https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/kernel_tests/map_fn_test.py, since the fix needs to be applied to map_fn.
@mdanatg I was posting the same if you see the last commit 😸 |
It's probably not that frequent, since the functions passed to map_fn are usually simple and don't use control flow. I think it's useful to fix though. |
I don't think that we could just use Cause we get: |
Correct, tf_convert doesn't call the function, it just translates it. So we need something like:
|
Sorry I needed to restartthe container after a system upgrade and I got:
So I will need again hours of recompiling (see tensorflow/build#5 and #39560) 😞 Can you use the Google remote or your local cache to test this a push directly here? |
I can trigger a build which should finish faster. |
Ok I've done a blind commit. If you can start a CI run. |
Kokoro we invoke you こころ 🙏 🍖 |
I don't know if you can disclose this but is the Kokoro waiting list only related to the public queue visible with
kokoro:force-run
|
I'm not sure, actually. Usually it picks up immediately. |
|
Yep - looks like the tests passed! Consider updating the PR title. |
I hope that the title is clear now. |
This is a test to verify the failure of the case described in #26091 (comment)
/cc @dthkao