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

TypeError problem from monoexponential.py #141

Closed
d3christ opened this issue Oct 16, 2018 · 7 comments
Closed

TypeError problem from monoexponential.py #141

d3christ opened this issue Oct 16, 2018 · 7 comments
Labels
question issues detailing questions about the project or its direction

Comments

@d3christ
Copy link

We are running tedana and are getting the following TypeError. Any ideas on what could be the cause?

$ tedana -d BOLD_SmokeCues_MultiTE_12.nii BOLD_SmokeCues_MultiTE_12a.nii BOLD_SmokeCues_MultiTE_12b.nii -e 13 36 58
/u/home/d/dpchrist/.local/lib/python3.6/site-packages/sklearn/utils/fixes.py:313: FutureWarning: numpy not_equal will not check object identity in the future. The comparison did not return the same result as suggested by the identity (`is`)) and will change.
  _nan_object_mask = _nan_object_array != _nan_object_array
/u/home/d/dpchrist/.local/lib/python3.6/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
Traceback (most recent call last):
  File "/u/home/d/dpchrist/.local/bin/tedana", line 11, in <module>
    load_entry_point('tedana==0.0.4', 'console_scripts', 'tedana')()
  File "/u/home/d/dpchrist/.local/lib/python3.6/site-packages/tedana/workflows/tedana.py", line 447, in _main
    tedana_workflow(**vars(options))
  File "/u/home/d/dpchrist/.local/lib/python3.6/site-packages/tedana/workflows/tedana.py", line 371, in tedana_workflow
    t2s, s0, t2ss, s0s, t2sG, s0G = model.fit_decay(catd, tes, mask, masksum)
  File "/u/home/d/dpchrist/.local/lib/python3.6/site-packages/tedana/model/monoexponential.py", line 90, in fit_decay
    betas = np.linalg.lstsq(X, log_data, rcond=None)[0]
  File "/u/local/apps/python/3.6.1/lib/python3.6/site-packages/numpy-1.12.1-py3.6-linux-x86_64.egg/numpy/linalg/linalg.py", line 1961, in lstsq
    0, work, -1, iwork, 0)
TypeError: must be real number, not NoneType
@tsalo
Copy link
Member

tsalo commented Oct 17, 2018

It looks like the problem is the argument rcond in version 1.12.1 of numpy. To replicate with that version:

import numpy as np
a = np.random.random((100, 1))
b = np.random.random((100, 10))
betas = np.linalg.lstsq(a, b, rcond=None)[0]

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/tsalo/anaconda/envs/python3/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 1961, in lstsq
    0, work, -1, iwork, 0)

I think the best solution would be to update numpy. I believe that tedana requires 1.14 at minimum.

@emdupre
Copy link
Member

emdupre commented Oct 17, 2018

Just to 👍 @tsalo's suggestion, it looks like your numpy version is likely causing the error. If you could update that library @d3christ, hopefully that will resolve the issue ! Let us know how it goes.

@emdupre emdupre added the question issues detailing questions about the project or its direction label Oct 17, 2018
@d3christ
Copy link
Author

@emdupre @tsalo
Thank you guys!
So after upgrading numpy I ran into a memory error, so I decided to upgrade all the dependencies.

I am running the same files in a hpc node and then locally on my mac. They are both taking a really long time to run and I do not know if that is normal. They are both at
...scipy/stats/stats.py:1713: FutureWarning.... then
return np.reduce(sorted[indexer] * weights, axis=axis / sumval

I would copy and paste but I am on a different computer because the tedana command seems to be taking up all of my ram lol. Is this normal?

@tsalo
Copy link
Member

tsalo commented Oct 24, 2018

Sorry for the delay! Did it finish running at any point? In my experience, tedana takes about 20-30 minutes to finish running on a single run.

@tsalo
Copy link
Member

tsalo commented Feb 1, 2019

@d3christ Was this ever resolved (i.e., did it finish running)? If so, I'd like to close this issue.

@jbteves
Copy link
Collaborator

jbteves commented Apr 20, 2019

@tsalo if we don't hear back by May 1 I'd like to propose we close this issue. I failed to mention more details in #188 but the symptoms described above were very similar to the all-cores problem I had on my server, so I would suspect that the user above had the same problem. If somebody comes along later with the same problem we can re-open this one.

@tsalo
Copy link
Member

tsalo commented Apr 20, 2019

I think it's reasonable to close it now. The last update was a couple of months ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question issues detailing questions about the project or its direction
Projects
None yet
Development

No branches or pull requests

4 participants