Skip to content
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

Added example and description about numpy_function() in Dataset.map() #37853

Merged
merged 4 commits into from Apr 2, 2020

Conversation

ashutosh1919
Copy link
Contributor

Fixes #36979 .
@mihaimaruseac , Please review.

@tensorflow-bot tensorflow-bot bot added the size:S CL Change Size: Small label Mar 24, 2020
@gbaned gbaned self-assigned this Mar 24, 2020
@gbaned gbaned added the comp:data tf.data related issues label Mar 24, 2020
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Mar 24, 2020
Copy link
Collaborator

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

Although the example looks good to me, I don't think it fixes the issue

tensorflow/python/data/ops/dataset_ops.py Outdated Show resolved Hide resolved
tensorflow/python/data/ops/dataset_ops.py Outdated Show resolved Hide resolved
@ashutosh1919
Copy link
Contributor Author

@mihaimaruseac ,
In the issue mentioned, non-compatibility of numpy() function with MapDataset is discussed.
I have also mentioned another past issue about same topic. But, there was a bit confusion between py_function and numpy_function. That will be clear with addition of this example.
I think this fixes the issue. If you think still something is missing, please mention it here so that I will also include that in this PR.

mihaimaruseac
mihaimaruseac previously approved these changes Mar 25, 2020
PR Queue automation moved this from Assigned Reviewer to Approved by Reviewer Mar 25, 2020
@tensorflow-bot tensorflow-bot bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Mar 25, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Mar 25, 2020
@gbaned gbaned added ready to pull PR ready for merge process and removed ready to pull PR ready for merge process labels Mar 30, 2020
PR Queue automation moved this from Approved by Reviewer to Reviewer Requested Changes Apr 1, 2020
@tensorflow-bot tensorflow-bot bot removed the ready to pull PR ready for merge process label Apr 1, 2020
@ashutosh1919
Copy link
Contributor Author

@mihaimaruseac and @jsimsa , Added description. Please review.

Copy link
Contributor

@jsimsa jsimsa left a comment

Choose a reason for hiding this comment

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

Thank you. One minor comment, otherwise this looks good to me.

PR Queue automation moved this from Reviewer Requested Changes to Approved by Reviewer Apr 2, 2020
@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Apr 2, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Apr 2, 2020
@ashutosh1919
Copy link
Contributor Author

@mihaimaruseac, thank you so much for the commit.

@gbaned gbaned added ready to pull PR ready for merge process and removed ready to pull PR ready for merge process labels Apr 2, 2020
@tensorflow-copybara tensorflow-copybara merged commit 8d366c3 into tensorflow:master Apr 2, 2020
PR Queue automation moved this from Approved by Reviewer to Merged Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes comp:data tf.data related issues ready to pull PR ready for merge process size:S CL Change Size: Small
Projects
PR Queue
  
Merged
Development

Successfully merging this pull request may close these issues.

AttributeError: 'Tensor' object has no attribute 'numpy'
7 participants