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

Fix numpy warning with numpy 1.17.0+ #30559

Merged
merged 1 commit into from Jul 10, 2019

Conversation

yongtang
Copy link
Member

This fix tries to address the issue raised in #30427 where
import tensorflow caused the following warning with numpy 1.17.0+:

/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])

The issue was cause by changes in numpy: numpy/numpy@ad1e060

This fix fixes the warning.

This fix fixes #30427.

Signed-off-by: Yong Tang yong.tang.github@outlook.com

This fix tries to address the issue raised in 30427 where
`import tensorflow` caused the following warning with numpy 1.17.0+:
```
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
```

The issue was cause by changes in numpy: numpy/numpy@ad1e060

This fix fixes the warning.

This fix fixes 30427.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
@tensorflow-bot tensorflow-bot bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Jul 10, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jul 10, 2019
@rthadur rthadur self-assigned this Jul 10, 2019
@rthadur rthadur added this to Assigned Reviewer in PR Queue via automation Jul 10, 2019
@rthadur rthadur added the prtype:bugfix PR to fix a bug label Jul 10, 2019
@tensorflow-copybara tensorflow-copybara merged commit 3402d71 into tensorflow:master Jul 10, 2019
PR Queue automation moved this from Assigned Reviewer to Merged Jul 10, 2019
pull bot pushed a commit to Rachelmorrell/tensorflow that referenced this pull request Jul 10, 2019
@yongtang yongtang deleted the 30427-numpy branch July 10, 2019 21:57
@Akeaakar
Copy link

what is the solution. Can u explain pls

@yalcincenik
Copy link

what is the solution then? I couldn't understand the procedure. What I understood is that to change the tensorflow version instead of numpy ? But how?

@Akeaakar
Copy link

Actually I downloaded numpy then It worked probably

wchargin pushed a commit to tensorflow/tensorboard that referenced this pull request Jul 31, 2019
This commit integrates upstream changes into TensorBoard’s
`tensorflow_stub` to resolve a deprecation warning in recent release
candidates for NumPy.

Upstream bug: <tensorflow/tensorflow#30427>

Upstream fix: <tensorflow/tensorflow#30559>
@geyang
Copy link

geyang commented Aug 2, 2019

when does this land in a release? the warnings are a bit distracting atm.

@mihaimaruseac
Copy link
Collaborator

Cherry-picking this in #31333 for 1.14.1 patch release. It will also be included in a future main release shortly.

@yongtang
Copy link
Member Author

yongtang commented Aug 5, 2019

@mihaimaruseac Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes prtype:bugfix PR to fix a bug 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.

FutureWarning: Deprecated numpy API calls in tf.python.framework.dtypes
9 participants