Skip to content

Workflow for two-level GLM (nilearn tutorial) #33

Open
@yibeichan

Description

@yibeichan

Hello, I'm working on doing a two-level GLM nilearn tutorial for Pydra. But I've been having problems with a node in the workflow for more than two weeks (@djarecka, @htwangtw, and I have discussed it over past weeks). We've tried a couple ways to debug but haven't solved the problem yet. Here is a summary about what's happening:

In this two-level GLM tutorial, the analytical logic is:

  1. download data (a task function)
  2. run first level for each subject (a workflow)
  3. starting the second level estimation using results from the 2nd step (a task function)
  4. multiple statistical testings.... (other tasks...)
  5. step 3&4 together can be set up as a workflow, but let's talk about task function first for the sake of the current issue.

I write the whole workflow using nilearn and make sure the code itself is error-free. Each pydra task function can run successful as a standalone task. When I connect tasks into workflow, errors come up.

  1. The workflow works fine to get first level estimation
  2. The problem happens at secondlevel_estimation see here cell 18.
    2.1 The input of secondlevel_estimation is a list of firstlevel model, the outputs are (a) secondlevel mask from SecondLevelModel() and (b) secondlevel stats estimations
    2.2 If run secondlevel_estimation as a task (outside of workflow), it prints results fine.
    2.3 If run secondlevel_estimation as a node in the workflow, it runs and can print out outcomes at every step, but it CANNOT return results. Here (last line) is the error 'NoneType' object has no attribute 'errored'
    2.4 Since secondlevel_estimation can't return results, it has problems linking to the next node, so we will get error as graph is not empty, but not able to get more tasks - something is wrong (e.g. with the filesystem) see the last cell output here

Now the question is why this secondlevel_estimation node can't return results even if the output at each of its step can be print out.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions