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

New test errors on Python 3 Travis bots #1399

Closed
arokem opened this issue Jan 9, 2018 · 9 comments
Closed

New test errors on Python 3 Travis bots #1399

arokem opened this issue Jan 9, 2018 · 9 comments

Comments

@arokem
Copy link
Contributor

arokem commented Jan 9, 2018

We're now seeing this across several PRs.

======================================================================
ERROR: dipy.reconst.tests.test_dti.test_mask
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/nipy/dipy/venv/lib/python3.4/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/travis/build/nipy/dipy/venv/lib/python3.4/site-packages/dipy/reconst/tests/test_dti.py", line 520, in test_mask
    assert_almost_equal(dtifit_w_mask.S0_hat[0, 0, 0], dtifit.S0_hat[0, 0, 0])
  File "/opt/python/3.4.6/lib/python3.4/unittest/case.py", line 841, in assertAlmostEqual
    if round(abs(second-first), places) == 0:
TypeError: type numpy.ndarray doesn't define __round__ method

Let's keep discussions about it here, so that we can all debug it together.

Is anyone already looking into this? @skoudoro ?

@arokem
Copy link
Contributor Author

arokem commented Jan 9, 2018

Googling for this, I'm a bit mystified. This seems to have been discussed a while back:

http://thread.gmane.org/gmane.comp.python.numeric.general/37179

But I imagine it must've been fixed since.

@aarya22
Copy link
Contributor

aarya22 commented Jan 9, 2018

@arokem
Copy link
Contributor Author

arokem commented Jan 9, 2018

To answer @aarya22's question over on #1395, the issue is that we don't have control of this rounding operation, because it is happening inside of the assertion, that we are getting from numpy. So, we can't change the way round is called.

@aarya22
Copy link
Contributor

aarya22 commented Jan 9, 2018

Ah I see its in the unittest, not in our code.

@aarya22
Copy link
Contributor

aarya22 commented Jan 9, 2018

I came across this from the folks over at pyTorch, maybe something is being skipped in Travis?

pytorch/pytorch#4260

@skoudoro
Copy link
Member

no clue for the moment, still investigating and it starts to make me crazy.

Trusty image change on Travis as you can see here and our error appear almost at the same time. I'm still not sure if there is a link between this 2 events.

@skoudoro
Copy link
Member

Can you use the previous Trusty image on your last PR @arokem ?

@arokem
Copy link
Contributor Author

arokem commented Jan 10, 2018

Oh yeah - check it out. Here it only happens with the pre-release version:

https://travis-ci.org/nipy/dipy/jobs/323884050

And now, boom! So it definitely has to do with the 1.14 release of numpy (3 days ago...).

@arokem
Copy link
Contributor Author

arokem commented Jan 10, 2018

Take a look at #1400: maybe that fixes it?

skoudoro added a commit that referenced this issue Jan 10, 2018
BF: fixes #1399, removing an un-needed singleton dimension.
ShreyasFadnavis pushed a commit to ShreyasFadnavis/dipy that referenced this issue Sep 20, 2018
ShreyasFadnavis pushed a commit to ShreyasFadnavis/dipy that referenced this issue Sep 20, 2018
BF: fixes dipy#1399, removing an un-needed singleton dimension.
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

3 participants