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

AttributeError: 'DWI' object has no attribute 'DTIvectors' #325

Open
AvantiShri opened this issue Jun 27, 2024 · 0 comments
Open

AttributeError: 'DWI' object has no attribute 'DTIvectors' #325

AvantiShri opened this issue Jun 27, 2024 · 0 comments

Comments

@AvantiShri
Copy link

Describe the Issue
For several pydesigner jobs (about 1/3rd in a dataset of hundreds), pydesigner terminates at the DKI step with "AttributeError: 'DWI' object has no attribute 'DTIvectors'". The stack trace is:

DKI Parameters: [0%]Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/joblib/parallel.py", line 862, in dispatch_one_batch
tasks = self._ready_batches.get(block=False)
File "/usr/lib/python3.7/queue.py", line 167, in get
raise Empty
_queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/pydesigner", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/designer/pydesigner.py", line 980, in main
nthreads=args.nthreads
File "/usr/local/lib/python3.7/dist-packages/designer/fitting/dwipy.py", line 2802, in fit_regime
mk, rk, ak, kfa, mkt, trace = img.extractDKI()
File "/usr/local/lib/python3.7/dist-packages/designer/fitting/dwipy.py", line 1080, in extractDKI
self.dt[:, i]) for i in inputs))
File "/usr/local/lib/python3.7/dist-packages/joblib/parallel.py", line 1085, in __call__
if self.dispatch_one_batch(iterator):
File "/usr/local/lib/python3.7/dist-packages/joblib/parallel.py", line 873, in dispatch_one_batch
islice = list(itertools.islice(iterator, big_batch_size))
File "/usr/local/lib/python3.7/dist-packages/designer/fitting/dwipy.py", line 1080, in <genexpr>
self.dt[:, i]) for i in inputs))
AttributeError: 'DWI' object has no attribute 'DTIvectors'

Issue Reproduction
The datasets are multishell dMRI datasets acquired with GE scanners (3 shells, 141 diffusion directions, 7 b=0 volumes interleaved). Pydesigner was run using docker. The command to launch it was:

docker run --user 1000:999 --rm -v /home/iapladmin/scratch/11a39f4d-76da-4d91-8888-1bbd4eefc82d/output/pydesigner_out:/output -v /home/iapladmin/scratch/11a39f4d-76da-4d91-8888-1bbd4eefc82d/input:/input dmri/neurodock pydesigner --verbose --standard --nthreads 1 --output /output /input/00aebdc8-bfcf-448e-9271-ac75d4697c69_conv.nii.gz /input/7aeeda20-8555-4282-bb92-c1662bd44fa8_conv.nii.gz

Supplemental Information
These are all Ubuntu workstations. Can dig up the specific OS version if necessary but the error seems to originate from the python code. I have attached the logs obtained from the subprocess command that I used to launch the job (note that the subprocess command separates the stdout and stderr logs, and progress messages get printed to the stderr logs for some reason, so be warned that the logs are quite long due to the progress messages): DTIvectors_error.log

Any insight into the source of the issue is appreciated! I am new to neuroimaging, but eager to learn and contribute pull requests if helpful. Thank you for your work on pydesigner - it seems to be the most accessible way to run DKI at present.

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

1 participant