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

mriqc_clf T1w classifier not working in mriqc latest release on docker #8

Open
YumekaMengjiaLYU opened this issue Nov 12, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@YumekaMengjiaLYU
Copy link

Hello,

I am interesting in the T1w classifier function mriqc_clf which seems to be no longer supported in the latest release
On my system, container image files for both the latest and second latest version (0.16.1) of MRIQC were downloaded from docker hub.

When I ran the classifier on the latest version
singularity exec -H ~/mengjia_space -B ~/mengjia_space:/output ~/mriqc-21.0.0.sif mriqc_clf --load-classifier -X group_T1w.tsv -v
I got the error

WARNING: skipping mount of /local/path/to/output: stat /local/path/to/output: no such file or directory
FATAL:   container creation failed: mount /local/path/to/output->/output error: while mounting /local/path/to/output: mount source /local/path/to/output doesn't exist
(base) [rbc@cubic-login5 mengjia_space]$ singularity exec -H ~/mengjia_space -B ~/mengjia_space:/output ~/mriqc-21.0.0.sif mriqc_clf --load-classifier -X group_T1w.tsv -v
Traceback (most recent call last):
  File "/opt/conda/bin/mriqc_clf", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.8/site-packages/mriqc/bin/mriqc_clf.py", line 190, in main
    from ..classifier.helper import CVHelper
  File "/opt/conda/lib/python3.8/site-packages/mriqc/classifier/helper.py", line 19, in <module>
    from sklearn.metrics.scorer import check_scoring
ModuleNotFoundError: No module named 'sklearn.metrics.scorer'

However, when I ran the same command with the second latest (0.16.1) version
singularity exec -H ~/mengjia_space -B ~/mengjia_space:/output ~/mriqc_0.16.1.sif mriqc_clf --load-classifier -X group_T1w.tsv -v, I was able to obtain the output file with prediction labels.

/usr/local/miniconda/lib/python3.7/site-packages/sklearn/utils/__init__.py:4: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Sequence
/usr/local/miniconda/lib/python3.7/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
  from numpy.core.umath_tests import inner1d
211112-09:45:37 mriqc.classifier:INFO Results saved as /cbica/projects/RBC/mengjia_space/mclf_run-20211112-094536*

Is it true that mriqc_clf is no longer supported? Thank you so much for your help and feedback!!

@effigies
Copy link
Member

effigies commented Dec 14, 2021

This should have been fixed in 55269f8de6389efa4f60373eb40f269c1476e4cd (part of nipreps/mriqc#927). Can you try building your Singularity image on 21.0.0rc2?

@oesteban oesteban added the bug Something isn't working label Dec 14, 2021
@Na6262
Copy link

Na6262 commented Jan 10, 2022

I ran into the same problem!
I tried building the latest mriqc image, but mriqc_clf still didn't work.

Here is the error I got:

Traceback (most recent call last):                                                                                              
            File "/opt/conda/bin/mriqc_clf", line 8, in <module>                                                                          
              sys.exit(main())                                                                                                            
            File "/opt/conda/lib/python3.8/site-packages/mriqc/bin/mriqc_clf.py", line 303, in main                                       
              cv_helper = CVHelper(                                                                                                       
            File "/opt/conda/lib/python3.8/site-packages/mriqc/classifier/helper.py", line 200, in __init__                               
              self.load(load_clf)                                                                                                         
            File "/opt/conda/lib/python3.8/site-packages/mriqc/classifier/helper.py", line 716, in load                                   
              from sklearn.externals.joblib import load as loadpkl                                                                        
          ModuleNotFoundError: No module named 'sklearn.externals.joblib'

If I use version 0.16.0 instead, I can get a similar output file as Mengjia. However, here rises a question: since my IQMs were computed by version 21.0.0rc2, can I trust the prediction I got from version 0.16.0?

@oesteban oesteban transferred this issue from nipreps/mriqc Mar 13, 2022
@oesteban
Copy link
Member

The MRIQC classifier aged pretty badly. We have outsourced it to the nipreps/mriqc-learn package, where I'm also moving this issue for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants