-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workflow's nodes' output directories point to TMPDIR instead of base_dir #3542
Comments
@tsalo Sorry for missing this: res = wf.run()
nodes = {node.fullname: node for node in res.nodes}
nodes['init_minimal_wf.write_string'].output_dir() |
Thanks @effigies! Does that mean the behavior I was seeing was expected? Or is it a bug that is easier to circumvent than fix? In any case, I'll try out your recommendation. Do you think this info is worth incorporating into the documentation somewhere? I know most folks don't use pytest to test their nipype workflows, but knowing how to access individual nodes from a run workflow could make it more common. |
Yes. The workflow graph that you construct is basically a template for the execution graph. The execution graph is flattened from nested workflows to a flat workflow, iterables are expanded, and It's definitely worth adding to the docs. If you have a use case, would you be willing to write up a small notebook that we could render? |
Happy to! I've noticed that a lot of the advanced examples have been offloaded to https://github.com/miykael/nipype_tutorial. Should the notebook go there, or in the nipype docs? |
Neither location has much maintenance effort devoted to it at this point. I have permissions here though, so I guess here is better. |
Sounds good! |
I opened niflows/nipype1-examples#7, but can move it to this repo if necessary. |
Summary
I am trying to write tests for nipype workflows, and I would like to use
get_node()
to select nodes' outputs, rather than hardcoding paths to output files. However, I've noticed that the nodes'output_dir()
methods point to a subfolder in theTMPDIR
environment variable, rather than to subfolders in the workflow'sbase_dir
. It seems like this is a bug.Tagging @mattcieslak as he's been helping me debug this.
Actual behavior
node = wf.get_node("write_string").output_dir()
points to temporary directory (/private/var/.../init_minimal_wf/write_string
).Expected behavior
node = wf.get_node("write_string").output_dir()
would point to/some/absolute/path/init_minimal_wf/write_string
(the node's subfolder inbase_dir
).How to replicate the behavior
I wrote a minimal workflow with
Script/Workflow details
Please put URL to code or code here (if not too long).
Platform details:
Execution environment
My python environment outside container
The text was updated successfully, but these errors were encountered: