Skip to content

FIX: Un-set incorrect default options in TOPUP #2637

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 3 commits into from
Jul 27, 2018

Conversation

djarecka
Copy link
Collaborator

This is follow-up to the #2533. I started from topup, issues were reported by @atsuch in the comments to the PR.

  • I removed the default values and usedefault=True and introduced default value in the description (it's probably better to let FSL set these values)
  • fixing reg_labda input

If this is ok, I should probably add similar changes to other FSL interfaces changed in #2533

@codecov-io
Copy link

codecov-io commented Jul 13, 2018

Codecov Report

Merging #2637 into master will decrease coverage by 3.59%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #2637     +/-   ##
=========================================
- Coverage   67.62%   64.02%   -3.6%     
=========================================
  Files         340      338      -2     
  Lines       43003    42952     -51     
  Branches     5321     5318      -3     
=========================================
- Hits        29080    27501   -1579     
- Misses      13225    14394   +1169     
- Partials      698     1057    +359
Flag Coverage Δ
#smoketests ?
#unittests 64.02% <100%> (-1.06%) ⬇️
Impacted Files Coverage Δ
nipype/interfaces/fsl/epi.py 65.18% <100%> (ø) ⬆️
nipype/interfaces/nilearn.py 40% <0%> (-56.67%) ⬇️
nipype/utils/spm_docs.py 25.92% <0%> (-44.45%) ⬇️
nipype/interfaces/nitime/analysis.py 43.15% <0%> (-36.85%) ⬇️
nipype/interfaces/freesurfer/base.py 49.59% <0%> (-30.9%) ⬇️
nipype/utils/logger.py 59.7% <0%> (-29.86%) ⬇️
nipype/algorithms/rapidart.py 35.39% <0%> (-29.21%) ⬇️
nipype/interfaces/spm/base.py 58.41% <0%> (-29.05%) ⬇️
nipype/utils/provenance.py 55.73% <0%> (-28.99%) ⬇️
nipype/interfaces/fsl/model.py 55.26% <0%> (-25.35%) ⬇️
... and 45 more

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 a7ab541...a0a602c. Read the comment docs.

'.'))
subsamp = traits.Int(1, usedefault=True,
argstr='--subsamp=%d', desc='sub-sampling scheme')
'(default in FSL 10).'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are FSL 10, FSL 1, and FSL 8?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I'm reading this today it's not clear indeed... I meant that in (a version of) FSL the default value for this arg is 10.
The story is that some months ago I added usedefault=True to places where default value of traits was chosen, but this changed the output of some workflows and we got complains about it, so I thought that we can just keep the FSL defaults and only inform about these values (but in the description, not in the trait's default). I'm open to other suggestions, I'm really not sure what is the best strategy.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the problem that the documented defaults and actual defaults differ, and thus passing these "default" values changes the behavior of the interface? If so, I think adding this description will confuse users.

I think I would, for now, make a comment in the interface docstring such as:

Some default values provided in the TOPUP documentation appear to differ from
the defaults used when no argument is provided.
For reference we provide the following list.
If an empirical default value is known, it is accurate as of version <VERSION>.

======  ===========  =========
Option   Documented  Empirical
======  ===========  =========
``warp_res``  10     <UNKNOWN>
``othervar``   9      8
...
======  ===========  =========

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@effigies - yes this is probably the main problem, some flags shouldn't be used at all as default. I will review this later and add the table you suggested. It is extra work for us to keep this updated, but it might be the only solution that make sense...

This is not the only interface that might have similar problems (at least not the only one that possibly was changed after my PR with usedefault=True)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe put a big warning that the values may be out-of-date? We're not going to be able to regularly update it, but letting people know there's an issue worth looking into and what we knew at this point seems like the best we can do.

@effigies effigies added this to the 1.1.1 milestone Jul 23, 2018
@effigies effigies mentioned this pull request Jul 27, 2018
1 task
@djarecka
Copy link
Collaborator Author

djarecka commented Jul 27, 2018

@effigies @satra - I removed the misleading info about the defaults values. I was planning to do more, but I gave up, wasn't sure how to provide more information without possible confusion. Two more problems, that I can always address in the future PR:

  • this default values are often for argument that are optional, so by default nothing is set, only when other options are chosen. Since FSL doesn't specify the requirements I'm a bit afraid to provide too much information based on my "guesses"
  • we have default arguments (that were there long before I started messing up) like --jacout that are not described in the help (at least not in 5.0.9 and 5.0.10) and not in the fsl user guide. It's not clear to me why we have them (and don't follow the default topup command), but I'm sure that someone had a reason and I don't want to risk that by removing them I'll change users output again.

@djarecka djarecka changed the title [WIP] Fix/updating fsl inputs Fix/updating fsl inputs Jul 27, 2018
@djarecka djarecka mentioned this pull request Jul 27, 2018
1 task
@effigies effigies changed the title Fix/updating fsl inputs FIX: Un-set incorrect default options in TOPUP Jul 27, 2018
@effigies
Copy link
Member

@djarecka Good to merge? (I'm ignoring the Travis failures. Should be fixed when merged into master.)

@effigies
Copy link
Member

Ah, see you removed WIP. Merging.

@effigies effigies merged commit 715ad0a into nipy:master Jul 27, 2018
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.

4 participants