Skip to content

ENH: Add NaN failure mode to CompCor interfaces #2819

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

Merged
merged 1 commit into from
Dec 16, 2018

Conversation

effigies
Copy link
Member

Summary

Following discussion in nipreps/fmriprep#1433, having CompCor interfaces gracefully handle failure states by returning NaN arrays of the appropriate size is preferable to crashing the pipeline.

This PR adds a failure_mode input to the interface, which defaults to 'error' and maintains the current behavior. If failure_mode == 'nan', then exceptions are not raised, and columns of NaNs are returned.

List of changes proposed in this PR (pull-request)

  • Add failure_mode input to CompCor interfaces
  • If failure_mode == 'nan', return columns of NaNs instead of raising exceptions

Acknowledgment

  • (Mandatory) I acknowledge that this contribution will be available under the Apache 2 license.

@codecov-io
Copy link

codecov-io commented Dec 12, 2018

Codecov Report

Merging #2819 into master will decrease coverage by <.01%.
The diff coverage is 30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2819      +/-   ##
==========================================
- Coverage   67.48%   67.47%   -0.01%     
==========================================
  Files         341      341              
  Lines       43343    43351       +8     
  Branches     5375     5377       +2     
==========================================
+ Hits        29248    29250       +2     
- Misses      13396    13402       +6     
  Partials      699      699
Flag Coverage Δ
#smoketests 50.53% <10%> (-0.02%) ⬇️
#unittests 64.88% <30%> (-0.03%) ⬇️
Impacted Files Coverage Δ
nipype/algorithms/confounds.py 66.6% <30%> (-0.66%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35b58cd...16af71e. Read the comment docs.

@effigies effigies added this to the 1.1.7 milestone Dec 14, 2018
@effigies effigies mentioned this pull request Dec 14, 2018
9 tasks
@effigies effigies merged commit 5d37cae into nipy:master Dec 16, 2018
@effigies effigies deleted the enh/compcor_svd_failure branch December 16, 2018 14:41
yarikoptic added a commit to yarikoptic/nipype that referenced this pull request Jan 11, 2019
1.1.7 (December 17, 2018)

* FIX: Copy node list before generating a flat graph (nipy#2828)
* FIX: Update pytest req'd version to 3.6 (nipy#2827)
* FIX: Set ResourceMonitor.fname to an absolute path (nipy#2824)
* FIX: Order of SPM.NewSegment channel_info boolean tuple is (Field, Corrected) (nipy#2817)
* FIX: Indices were swapped for memory and cpu profile data (nipy#2816)
* FIX: ``status_callback`` not called with ``stop_on_first_crash`` (nipy#2810)
* FIX: Change undefined ScriptError on LFS plugin to IOError (nipy#2803)
* ENH: Add NaN failure mode to CompCor interfaces (nipy#2819)
* ENH: Enable cnr_maps and residuals outputs for FSL eddy (nipy#2750)
* ENH: Improve ``str2bool`` + doctests (nipy#2807)
* TST: Improve py.test configuration of doctests (nipy#2802)
* DOC: Update DOI badge to point to all versions (nipy#2804)
* MAINT: Offload interfaces with help formatting (nipy#2797)
* MAINT: Reduce minimal code redundancy in filemanip.get_dependencies (nipy#2782)
* MAINT: Delayed imports to reduce import time (nipy#2809)
...
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

Successfully merging this pull request may close these issues.

2 participants