Open ghisvail opened 1 year ago
This will likely be "addressed" by #662 , because file-hash caching has been temporarily dropped in it. See #683 for plans to reimplement it
@tclose I tried re-running this script with current, but got the following error:
File ".../pydra/pydra/engine/core.py", line 605, in split
raise ValueError(
ValueError: Split is missing values for the following fields ['input_image']
Hi @ghisvail, this is the main syntactical change in the PR. You now need to pass the inputs to be split to the split()
method, i.e.
workflow.add(
ants.N4BiasFieldCorrection(name="bias_correction", input_image=workflow.reader.lzout.T1w))
workflow.bias_correction.split("input_image")
becomes
workflow.add(
ants.N4BiasFieldCorrection(name="bias_correction"))
workflow.bias_correction.split("input_image", input_image=workflow.reader.lzout.T1w)
NB: you can drop the "splitter" in this case and just use workflow.bias_correction.split(input_image=workflow.reader.lzout.T1w)
@tclose thanks for the fix. I am now getting the following error:
File ".../pydra/engine/submitter.py", line 75, in submit_from_call
if runnable.state is None:
^^^^^^^^^^^^^^
AttributeError: type object 'Workflow' has no attribute 'state'
from the following workflow submission:
import sys
wf = t1_linear(name="t1-linear", dataset_path=sys.argv[1])
with Submitter() as sub:
res = sub(wf)
print(res)
I tried with and without the split and combine semantics, both yield the same error.
I am trying to split a simple workflow consisting of 3 sequential steps (bias correction, registration and resampling) on multiple T1w images in a BIDS dataset. The code is provided below and consists of 3 ANTs tasks with a custom reader task attached upfront.
The workflow fetches the files fine, processes the bias correction step in parallel but then fails with a rather generic
AttributeError: 'Input' object has no attribute 'files_hash'
. The code listing and full traceback are available below.It is worth noting that the workflow runs fine if I provide a reader fetching a single file (
read_one_bidsfile
) and remove the split and combine steps. It also works if I provide the list of files manually to the workflow and don't use a reader task.Code:
Traceback: