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

Failing tests #45

Open
sanjayankur31 opened this issue Aug 1, 2019 · 10 comments
Open

Failing tests #45

sanjayankur31 opened this issue Aug 1, 2019 · 10 comments

Comments

@sanjayankur31
Copy link
Contributor

We're seeing these tests fail on Fedora 31 (rawhide). Looks like something changed in sympy:

+ cd nineml-python-1.0.1
+ nosetests-3.7 --exclude test_flat_body
BUILDSTDERR: ..................E..........................E...................................................................................................................................................................................
BUILDSTDERR: ======================================================================
BUILDSTDERR: ERROR: test_trigger (unittests.abstraction_test.dynamics_test.OnCondition_test)
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1308, in evalf
BUILDSTDERR:     rf = evalf_table[x.func]
BUILDSTDERR: KeyError: <class 'sympy.core.relational.StrictGreaterThan'>
BUILDSTDERR: During handling of the above exception, another exception occurred:
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/nineml/abstraction/expressions/base.py", line 199, in nineml_expression
BUILDSTDERR:     val = self.rhs.evalf(subs=kwargs)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1442, in evalf
BUILDSTDERR:     result = evalf(self, prec + 4, options)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1314, in evalf
BUILDSTDERR:     xe = x._eval_evalf(prec)
BUILDSTDERR: AttributeError: 'BooleanTrue' object has no attribute '_eval_evalf'
BUILDSTDERR: During handling of the above exception, another exception occurred:
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/test/unittests/abstraction_test/dynamics_test.py", line 713, in test_trigger
BUILDSTDERR:     self.assertEquals(return_values[i], python_func(**param_dict))
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/nineml/abstraction/expressions/base.py", line 206, in nineml_expression
BUILDSTDERR:     "', '".join(self.rhs_symbol_names)))
BUILDSTDERR: nineml.exceptions.NineMLUsageError: Incorrect arguments provided to expression 'A > -B/tau_r': 'A', 'B', 'tau_r' (expected 'B', 'tau_r', 'A')
BUILDSTDERR: ======================================================================
BUILDSTDERR: ERROR: test_Valid (unittests.abstraction_test.expressions_test.Expression_test)
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1309, in evalf
BUILDSTDERR:     r = rf(x, prec, options)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1227, in evalf_symbol
BUILDSTDERR:     val = options['subs'][x]
BUILDSTDERR: KeyError: w
BUILDSTDERR: During handling of the above exception, another exception occurred:
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/nineml/abstraction/expressions/base.py", line 199, in nineml_expression
BUILDSTDERR:     val = self.rhs.evalf(subs=kwargs)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1442, in evalf
BUILDSTDERR:     result = evalf(self, prec + 4, options)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1309, in evalf
BUILDSTDERR:     r = rf(x, prec, options)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 785, in evalf_trig
BUILDSTDERR:     re, im, re_acc, im_acc = evalf(arg, xprec, options)
BUILDSTDERR:   File "/usr/lib/python3.7/site-packages/sympy/core/evalf.py", line 1314, in evalf
BUILDSTDERR:     xe = x._eval_evalf(prec)
BUILDSTDERR: AttributeError: 'ImmutableDenseNDimArray' object has no attribute '_eval_evalf'
BUILDSTDERR: During handling of the above exception, another exception occurred:
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/test/unittests/abstraction_test/expressions_test.py", line 85, in test_Valid
BUILDSTDERR:     v = return_values[i] - python_func(**param_dict)
BUILDSTDERR:   File "/builddir/build/BUILD/nineml-python-1.0.1/nineml/abstraction/expressions/base.py", line 206, in nineml_expression
BUILDSTDERR:     "', '".join(self.rhs_symbol_names)))
BUILDSTDERR: nineml.exceptions.NineMLUsageError: Incorrect arguments provided to expression 'sin(w)': 'w' (expected 'w')
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Ran 225 tests in 156.559s
BUILDSTDERR: FAILED (errors=2)

Versions used in this build:

DEBUG util.py:587:    hdf5-devel-1.10.5-2.fc31.ppc64le                                              
DEBUG util.py:587:    python3-devel-3.7.4-3.fc31.ppc64le                                            
DEBUG util.py:587:    python3-h5py-2.9.0-4.fc31.ppc64le                                             
DEBUG util.py:587:    python3-lxml-4.2.5-2.fc30.ppc64le                                             
DEBUG util.py:587:    python3-nose-1.3.7-23.fc31.noarch                                             
DEBUG util.py:587:    python3-numpy-1:1.16.4-2.fc31.ppc64le                                         
DEBUG util.py:587:    python3-numpydoc-0.9.1-1.fc31.noarch                                          
DEBUG util.py:587:    python3-pyyaml-5.1.1-2.fc31.ppc64le                                           
DEBUG util.py:587:    python3-sphinx-1:2.1.2-1.fc31.noarch                                          
DEBUG util.py:587:    python3-sphinx_rtd_theme-0.4.3-2.fc31.noarch                                  
DEBUG util.py:587:    python3-sympy-1.4-1.fc31.noarch                                                       
@NineML-Committee
Copy link

NineML-Committee commented Aug 2, 2019 via email

@sanjayankur31
Copy link
Contributor Author

Hi Tom,

Have you had a chance to look at this? If there's anything I can do to help debug the issue, please let me know.

Cheers!
Ankur

@tclose
Copy link
Contributor

tclose commented Aug 13, 2019 via email

@sanjayankur31
Copy link
Contributor Author

sanjayankur31 commented Aug 13, 2019

I don't seem to have free cycles this week, but I'll try next week if I can.

@eclipseo
Copy link

Even if we "fix" the expression, the error keeps changing:

nineml.exceptions.NineMLUsageError: Incorrect arguments provided to expression 'A > -B/tau_r': 'tau_r', 'B', 'A' (expected 'B', 'tau_r', 'A')
nineml.exceptions.NineMLUsageError: Incorrect arguments provided to expression 'A > -B/tau_r': 'B', 'tau_r', 'A' (expected 'tau_r', 'A', 'B')
nineml.exceptions.NineMLUsageError: Incorrect arguments provided to expression 'A > -B/tau_r': 'tau_r', 'A', 'B' (expected 'B', 'tau_r', 'A')

@sanjayankur31
Copy link
Contributor Author

So, this is a sympy related change. if one uses a virtual environment with sympy 1.3, the test passes. So, looking at what changed in 1.4 now: https://github.com/sympy/sympy/wiki/Release-Notes-for-1.4

@sanjayankur31
Copy link
Contributor Author

I expect they will be quite isolated issues (i.e. contained to the Expressions class that is raising the exception), so it might be something that you could find an easy fix for. Cheers, Tom

Unfortunately, I've not had the time to really fix the issue either. Would you take a look please @tclose ---it should hopefully be something straightforward for someone that knows the codebase well.

@tclose
Copy link
Contributor

tclose commented Sep 19, 2019 via email

@sanjayankur31
Copy link
Contributor Author

Hi @tclose : any chance of a look at this sometime? We're nearing the Fedora 32 release so we'll have to drop NineML there if we can't get it fixed and building soonish.

@tclose
Copy link
Contributor

tclose commented Feb 18, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants