- Notifications
You must be signed in to change notification settings - Fork 536
Rebased version of JoinNode PR #658
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
Conversation
… The default is True.
…t works in an ANTS release.
Validate the join fields. Set a non-list join field item type to Any. Clean up white space.
Insert a J in the join item field name. Improve comments.
…e itersource iterable field.
@mwaskom @chrisfilo - could you please review this as well? |
Are you sure the rebase worked? It looks like there are some random unrelated commits in the PR still |
yes - i kept some of fred's commits that were unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is confusing, as nib
is the usual short import name for nibabel. Could cause problems for people trying to expand the tests down the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an easy fix, but that import existed in nipype before nibabel was even around. also except for numpy and scipy i personally don't think any other short names really exist. i wouldn't worry about this one. if there is a conflict a test will catch that one.
Does it make sense to make a larger edit to the docs such that the two chapters are
Iterables are much more closely related to JoinNode than they are to MapNode. |
+1 for a single chapter explaining all the graph surgical procedures - but perhaps we could do that after the merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, in rst you don't need this if you end the previous sentence with a double colon, e.g.
The code to achieve this is as folows:: import nipype...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Michael,
Thanks for the comments. I adhered as closely as possible to the layout, idioms and examples of the pre-existing Nipype manual.
The idiom of :: on a separate line is taken from there. In this and other Nipype manual conventions, I defer to the judgement of the Nipype team.
Fred
From: Michael Waskom <notifications@github.commailto:notifications@github.com>
Reply-To: nipy/nipype <reply@reply.github.commailto:reply@reply.github.com>
Date: Sunday, September 15, 2013 7:47 PM
To: nipy/nipype <nipype@noreply.github.commailto:nipype@noreply.github.com>
Cc: Me <loneyf@ohsu.edumailto:loneyf@ohsu.edu>
Subject: Re: [nipype] Rebased version of JoinNode PR (#658)
In doc/users/joinnode_and_itersource.rst:
+JoinNode, joinsource and joinfield
+==================================
+
+A :class:nipype.pipeline.engine.JoinNode
generalizes MapNode to
+operate in conjunction with an upstream iterable node to reassemble
+downstream results, e.g.:
+
+.. digraph:: joinnode_ex
+
- "A" -> "B1" -> "C1" -> "D";
- "A" -> "B2" -> "C2" -> "D";
- "A" -> "B3" -> "C3" -> "D";
+The code to achieve this is as follows:
+
+::
By the way, in rst you don't need this if you end the previous sentence with a double colon, e.g.
The code to achieve this is as folows::
import nipype...
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/658/files#r6369249.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, not a big deal, just something that caught my eye!
OK I have to admit that, after reading the new doc page a couple of times (and not looking too closely at the code), I don't really feel like I understand what these new tools are or why I might want to use them. I get the general point (they let you tie back together the branches of a graph that get split by using iterables), but only in a general sense. I think the docs might benefit from some more high-level commentary and maybe some motivation by real-world examples (either just in prose or in actual code). Maybe one of the example workflows could be updated to use this new machinery? I am just worried that all of this very nice-looking hard work will be wasted if it goes over the head of the average user. |
I agree about the real-world example. Every feature added was motivated by my very real workflow as well as limitations pointed out by several other user forum posts. Unfortunately, my real-world examples are too specialized for general use. Satra, you mentioned that the features will allow you to "rewrite workflows we were not able to do as a single step". Do you have a relevant example? It is in the nature of this fairly advanced feature that any example will be structurally complex. A typical scenario we face is as follows:
In this scenario, inputs can be iterable based on previous iterables, joined, transformed and rejoined. Fred From: Michael Waskom <notifications@github.commailto:notifications@github.com> OK I have to admit that, after reading the new doc page a couple of times (and not looking too closely at the code), I don't really feel like I understand what these new tools are or why I might want to use them. I get the general point (they let you tie back together the branches of a graph that get split by using iterables), but only in a general sense. I think the docs might benefit from some more high-level commentary and maybe some motivation by real-world examples (either just in prose or in actual code). Maybe one of the example workflows could be updated to use this new machinery? I am just worried that all of this very nice-looking hard work will be wasted if it goes over the head of the average user. — |
I see many useful uses of it:
|
Sure, but in each of those examples the obvious thing to me would be to use a series of MapNodes. Don't get me wrong, I'm not saying we shouldn't accept the PR or anything. This was clearly a lot of work, and the code/tests look to be high quality. I'm just giving my perspective as a potential experienced user who found the documentation for these features somewhat confusing and not making clear what this new functionality offered that I couldn't already do. |
Yes so far the only solution i found was to use a series of MapNodes but then there were important limitations to this:
|
These are two good examples of things that should be made more clear in the docs! |
Satra, https://groups.google.com/forum/?fromgroups=#!topic/nipy-user/DVYn0uNGnLM describes an error fixed by the satra@8113e55 commit included in this pull request branch. This is one of the commits that were inadvertently included in the pull request. As we discussed, I had intended to submit those minor changes as separate pull requests. I can remove those commits from this join_itersource_synchronize pull request branch if you'd prefer, although it might be easier for you to merge just the one branch. |
I agree that the documentation might need some work, but we can do it later in a separate PR - when all of us start using this new feature and get a better hang of it. Thanks for the great work @FredLoney! |
also - could you mention this new feature in the CHANGES file? |
could we merge this? |
Sadly, this never happened! |
@FredLoney this replaces #643
i have rebased this on the current master.