nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
625 stars 290 forks source link

directory changes causes node hash check to fail #2633

Open satra opened 2 years ago

satra commented 2 years ago

What happened?

When the input directory and the working directory were moved, fmriprep restarted computation on nodes. this wasn't expected since the modified time would have been the same. looking at the logs it seems that certain absolute paths got in the way. perhaps the internal configuration could be adjusted for any node taking in absolute paths outside the working directory to use a content hash.

What command did you use?

singularity run -e -B /om2 -B /om2/scratch/Sat/satra/workdir/fmrirep/sub-HC006:/workdir -B \
/om2/scratch/Thu/dclb/mct/:/input:ro -B /om2/scratch/Sat/satra/output:/out \
/om2/user/dclb/containers/imaging/fmriprep_20.2.6.sif /input /out participant \
--participant_label sub-HC006 -w /workdir --cifti-output 91k --mem_mb 40000 \
--output-spaces MNI152NLin6Asym:res-2 anat

What version of fMRIPrep are you running?

20.2.6

How are you running fMRIPrep?

Singularity

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

Work directory

Please copy and paste any relevant log output.

traits.trait_errors.TraitError: The 'fixed_image' trait of a _GenerateSamplingReferenceInputSpec i
nstance must be a pathlike object or string representing an existing file, but a value of '/nese/m
it/group/sig/projects/mct/derivatives/.templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsy
m_res-02_T1w.nii.gz' <class 'str'> was specified.

Error setting node input:
Node: gen_ref
input: fixed_image
results_file: /workdir/fmriprep_wf/single_subject_HC020_wf/func_preproc_ses_baseline_task_sst_rec_
unco_run_02_wf/bold_std_trans_wf/_std_target_MNI152NLin2009cAsym./select_tpl/result_select_tpl.pkl
z
value: /nese/mit/group/sig/projects/mct/derivatives/.templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI1
52NLin2009cAsym_res-02_T1w.nii.gz

211121-22:25:57,728 nipype.workflow WARNING:
         Error while checking node hash, forcing re-run.

Additional information / screenshots

No response

effigies commented 2 years ago

perhaps the internal configuration could be adjusted for any node taking in absolute paths outside the working directory to use a content hash.

This seems like it would require a fix in nipype...