nipreps / smriprep

Structural MRI PREProcessing (sMRIPrep) workflows for NIPreps (NeuroImaging PREProcessing tools)
https://nipreps.github.io/smriprep
Apache License 2.0
134 stars 39 forks source link

FIX: Avoid datasink connection, which will always invalidate cache #440

Closed mgxd closed 5 months ago

mgxd commented 5 months ago

Any ds_* workflow should probably not have an outputnode to avoid this problem.

effigies commented 5 months ago

The goal really is to use the outputs of the derivatives workflows, so that we're using the same inputs as downstream tools (or reruns with these derivatives as outputs) would be.

I think the problem here is with the complexity of DerivativesDataSink, which can actually modify the contents of files (e.g., setting the right dtypes). I believe the sink nodes already do not make copies when the input matches the output, but the fixup breaks that check. So maybe we should split into prepare and sink nodes, where the prepare node just passes through the filename if no changes are to be made?

mgxd commented 5 months ago

I agree - this boils down to splitting up the DDS behemoth into much more succinct parts. Should I close this?

effigies commented 5 months ago

No. :-)