-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Numpy 1.17.0 issues #6715
Comments
Thanks for bringing this to our attention.In the past, if numpy semantic was changing (as is the case here), we where following it.
What do you think of that? Do you have time to work on a PR that does the second option? |
I'm not sure I have the knowledge necessary for that second option. I can give you a PR that fixes the ERROR, but I am not at all certain what should be done about the 4 FAILs. |
Can you show all the errors? |
See #6721 for a resolution to the ERROR. Here are the 4 FAILs:
|
Fixes Theano#6715. Includes and supersedes Theano#6721.
* Fix subtensor numpy warning * Fix simple typo: varible->size -> variable->size Closes #6734 * Counteract hypot redefinition for old Python versions * fix doc warning * Update extending_theano.txt * OrderedDict cannot be imported from collections.abc, it is not abstract See Theano/Theano#6664 (comment) * Move more collections.abc imports to theano.compat * Use math.gcd instead of fractions.gcd when possible fractions.gcd() function has been removed from Python 3.9, it was deprecated since Python 3.5. https://docs.python.org/3.9/whatsnew/3.9.html#removed * DOC: Allow building with Sphinx >= 2.0 * MAINT: Avoid SyntaxWarnings on import in Python 3.8 * flake8 code style fixes * DOC: Retain compatibility with older Sphinx * MAINT: Be compatible with numpy 1.17 and scipy 1.3 Fixes #6715. Includes and supersedes #6721. * flake8 code style fixes * Remove doctest in python 3.4 * Do not install sphinx_rtd_theme for python 3.4 as the installation doesn't work anymore. * fixing typo in GammaIncC Op * re-add min > max clip test with fixed reference * DOC: min > max clip may not match numpy * updating travis build for Python 3 * order of stages * conda activate * installing conda properly * conda install on travis * conda activate issues on travis * conda activate issues on travis * doctest needs older version of numpy * doctest * reverting setup.cfg * conda version conflicts * need old sphinx version * sphinx version * don't bother building docs * moved nosetester import * also moving known failures plugin Co-authored-by: Adrian Seyboldt <adrian.seyboldt@gmail.com> Co-authored-by: Frédéric Bastien <frederic.bastien@gmail.com> Co-authored-by: Tim Gates <tim.gates@iress.com> Co-authored-by: Marcel Bargull <marcel.bargull@udo.edu> Co-authored-by: Arnaud Bergeron <abergeron@gmail.com> Co-authored-by: Miro Hrončok <miro@hroncok.cz> Co-authored-by: Rebecca N. Palmer <rebecca_palmer@zoho.com> Co-authored-by: Frederic Bastien <fbastien@nvidia.com>
I maintain the Theano package for the Fedora Linux distribution. We recently built all packages for the upcoming Fedora 31, and the Theano package, version 1.0.4, failed its tests. There was 1 ERROR and 4 FAILs. I tracked the issue down to the introduction of numpy 1.17.0 in Fedora. See https://bugzilla.redhat.com/show_bug.cgi?id=1737011 for more information. Here is what I have figured out so far.
The ERROR is because of changes to numpy's ceil, floor, and trunc ufuncs. To fix it, class
_tensor_py_operators
intheano/tensor/var.py
needs__ceil__
,__floor__
, and__trunc__
methods that do exactly what the currentceil
,floor
, andtrunc
methods do.The FAIL in
theano/gof/tests/test_compute_test_value.py
is because there is now one extra frame on the stack. Line 289 oftheano/gof/tests/test_compute_test_value.py
reads:but the -5 has to be a -6 for numpy 1.17.0.
The FAIL in
theano/tensor/tests/test_basic.py
is because the behavior of numpy's clip function changed. With numpy 1.16.4:but with numpy 1.17.0:
I think the order of comparing x to min and max in
Clip.impl
(theano/scalar/basic.py
) has to be reversed for numpy 1.17.0, if theano's clip is to behave like numpy's, as this test indicates.I do not know what is causing the last two FAILs. Two random number tests used to raise ValueError and now do not raise any error at all.
The text was updated successfully, but these errors were encountered: