Fix functional stage failing to find anat derivatives in all pipeline#287
Merged
Conversation
…peline The `all` orchestrator loaded only raw input data (filtering out desc entities) and passed the same session to both anatomical and functional stages. After anatomical processing exported derivatives to disk, the functional stage could not find them because the DataFrame was never refreshed. Pass anatomical outputs in-memory to the functional stage, consistent with how metrics and QC already receive in-memory outputs.
This was referenced Apr 9, 2026
Tests that process_session skips resolve_functional when anat_inputs is provided and that all.run() correctly maps AnatomicalOutputs fields to FunctionalInputs keys.
kaitj
approved these changes
Apr 9, 2026
Contributor
kaitj
left a comment
There was a problem hiding this comment.
lgtm 🚀
Was going to mention something about a test for "all" in the e2e since we do it for all the individual ones (except maybe longitudinal atm?), but saw you had the other PR open.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
allorchestrator loaded only raw input data (filteringdesc is null) and passed the same session DataFrame to both anatomical and functional stagesdesc-brainT1w, masks, transforms) to disk, the functional stage'sresolve_functionalcould not find them because the DataFrame was never refreshed with the new filesFileNotFoundError: Expected BIDS file not found: ... suffix='T1w', entities={'desc': 'brain'}at the start of functional processinganat_inputsparameter, consistent with how metrics and QC already receive in-memory outputs from earlier stagesRelated
anat_to_templatetransform direction inresolve_functionalrbc allpipeline stage handoffTest plan
process_sessionwith/withoutanat_inputs,all.run()field mappingrbc allon a dataset with both anat and func data (previously crashed at functional start)rbc func(unchanged path, uses DataFrame resolve as before)