Skip to content

version dependency/tests on numexpr -- truediv etc are NA in numexpr 1.4.2 #5845

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

Closed
yarikoptic opened this issue Jan 4, 2014 · 9 comments · Fixed by #6109
Closed

version dependency/tests on numexpr -- truediv etc are NA in numexpr 1.4.2 #5845

yarikoptic opened this issue Jan 4, 2014 · 9 comments · Fixed by #6109
Labels
Compat pandas objects compatability with Numpy or Python functions Testing pandas testing functions or related to the test suite
Milestone

Comments

@yarikoptic
Copy link
Contributor

while building for Ubuntu 12.04, bulk of tests fail due e.g.
ValueError: Unknown keyword argument 'truediv' from numexpr and AssertionError: Did not use numexpr as expected in test_expressions

Full log http://neuro.debian.net/_files/_buildlogs/pandas/0.13.0/pandas_0.13.0-2~nd12.04+1_i386.build

@jreback
Copy link
Contributor

jreback commented Jan 4, 2014

I don't think ever run on < Numexpr 2
which has been out since 2011

shouldn't this error have shown up before?

@jtratner
Copy link
Contributor

jtratner commented Jan 4, 2014

want me to put up a PR that:

  1. Checks >= 2.0 for numexpr
  2. Sets can use numexpr setting to False if it's < 2.0
  3. Skips tests (probably in setup) in test_expressions

?

@jreback
Copy link
Contributor

jreback commented Jan 4, 2014

would be gr8 @jtratner

@yarikoptic
Copy link
Contributor Author

might be worthwhile so we could provide builds for elderly ubuntus, may be without the benefits of recent numexpr. Debian wheezy has numexpr 2.0.1

@jreback
Copy link
Contributor

jreback commented Jan 4, 2014

maybe also change one of the Travis builds (maybe 2.6 one

@jreback
Copy link
Contributor

jreback commented Jan 4, 2014

to use Numexpr 1.4.2

@jtratner
Copy link
Contributor

jtratner commented Jan 4, 2014

@yarikoptic can you try building this branch and seeing if it works for you - I just added the division future import to all core files and removed the truediv kwarg from expressions. I believe this will actually make numexpr 1.4.2 work:

https://github.com/jtratner/pandas/tree/handle-old-numexpr

@yarikoptic
Copy link
Contributor Author

On Fri, 03 Jan 2014, Jeff Tratner wrote:

[1]@yarikoptic can you try building this branch and seeing if it works for
you - I just added the division future import to all core files and
removed the truediv kwarg from expressions. I believe this will actually
make numexpr 1.4.2 work:

[2]https://github.com/jtratner/pandas/tree/handle-old-numexpr

Hi Jeff,

Either I screwed up somewhere (I always leave that possibility even to obvious
actions), or they had no complete healing effect (I think one of the
failles is gone), I still observe the same failures after cherry-picking

0001-Add-division-future-import-everywhere.patch
0002-remove-explicit-truediv-kwarg.patch

e.g. building on ubuntu 12.04 with numexpr 1.4.2-1.2build2

ERROR: pandas.computation.tests.test_eval.TestAlignment.test_align_nested_unary_op('numexpr', 'python')

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/tmp/buildd/pandas-0.13.0/debian/tmp/usr/lib/python2.7/dist-packages/pandas/computation/tests/test_eval.py", line 794, in check_align_nested_unary_op
res = pd.eval(s, engine=engine, parser=parser)
File "/tmp/buildd/pandas-0.13.0/debian/tmp/usr/lib/python2.7/dist-packages/pandas/computation/eval.py", line 209, in eval
ret = eng_inst.evaluate()
File "/tmp/buildd/pandas-0.13.0/debian/tmp/usr/lib/python2.7/dist-packages/pandas/computation/engines.py", line 52, in evaluate
res = self._evaluate()
File "/tmp/buildd/pandas-0.13.0/debian/tmp/usr/lib/python2.7/dist-packages/pandas/computation/engines.py", line 100, in _evaluate
truediv=self.expr.truediv)
File "/usr/lib/pymodules/python2.7/numexpr/necompiler.py", line 624, in evaluate
context = getContext(kwargs)
File "/usr/lib/pymodules/python2.7/numexpr/necompiler.py", line 436, in getContext
raise ValueError("Unknown keyword argument '%s'" % map.popitem()[0])
ValueError: Unknown keyword argument 'truediv'

Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik

@jtratner
Copy link
Contributor

jtratner commented Jan 5, 2014

That's very strange. It shouldn't be adding truediv kwarg anywhere and I
ran the suite locally against numexpr 1.4.2. I will run again and try to
figure out what's up.

That said, I realize we may not be ablr support numexpr 1.4.2 because it
will segfault on certain division edge cases. This was only fixed a few
months ago...

I need to check this and the resolution may be to force no acceleration
under a specific version number of numexpr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants