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
Implementing a grouping feature to organize flow operations #114
Conversation
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.
Hey! I've gone through the changes on a superficial level and just added a few comments with questions. I'd appreciate if you could respond to those to clear a few things up for me and then we can move forward from there.
@b-butler Please ping me here when you want my input, thank's! |
@csadorf I was wondering if you would give the code a look. I believe everything should work now in the way we talked about it working with the main function. I still have to change the plain |
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.
I've tested this locally and went through most of the code. Really nice! Works like expected.
I'd appreciate if you could address the comments and suggestions. Thank you!
@b-butler One additional comment, since you are running into some linter issues, make sure to follow the code code contribution instructions on how to setup a developer environment. In that way you avoid committing any code that will fail the pipeline due to linter issues. |
This commit won't meet the checks either for the style standards. I will set up the correct environment at work tomorrow. |
I was just playing around with this feature and then I wondered: Why are we not defining that the specification of one more group leads to a selection of the union of operations of those groups? Is it because of the directives? At least for the run-command it should be possible, right? |
@csadorf that would be a possible option, but options for "run" mode would be confused at that point. If we had specified What would be the benefits for the user on this approach? |
Well, it would make it possible to execute a union of multiple operation groups. I interpret the groups more as tags, so I could tag some as I understand that this might not be possible for submissions, but I see no downside for local runs. |
The union is already done for local
I am not sure which would be most useful and least confusing for users though. |
@b-butler Please let me know when I should give it another pass, thx! |
This is the documentation pull request: glotzerlab/signac-docs#36 |
I think the code with testing is at a good point now. The only thing not tested is the group after feature which (since it requires correct ordering of decorators) shouldn't probably be exposed to the users just yet. If we want to support the union of groups for submission as a command-line argument that still has to be implemented and tested. |
@b-butler I've started reviewing and testing this. Could you make sure to either merge or rebase on master? |
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.
I've left some comments and in addition (per offline discussion), each FlowOperation should explicitly be a one-member FlowGroup and FlowGroups should be the only place where we manage directives.
@b-butler Please ping me here when I should give this another pass. Thank you. |
@b-butler What's the status here? Should I review/test? |
@csadorf yes I would you to test it out to try and break it. I can't seem to get the simple-scheduler working well on my desktop or laptop and couldn't find documentation on it. Forgot you wanted me to ping you, sorry. |
Also one style change
Add logic to FlowGroup._sumbit_cmd
Status's with groups are sorted by operation name (this is due to operation status having to be grabbed through groups). We sort the output. This just makes the test do the same
Co-Authored-By: Bradley Dice <bdice@bradleydice.com>
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.
I tested this locally found one more bug and added a few more action items in the comments, but otherwise I am satisfied enough to approve this for merge for beta-testing! @b-butler Thank you so much for seeing this through, you absolutely deserve an award for this.
@vyasr I approved this PR pending that the submission template tests are updated, checked, and related tests reactivated.
|
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.
@b-butler I have a few very small requests/questions. I'd be fine approving, except we also need to get the template tests back. I suggest we find a time where we sit together and address the last couple of items as well as reenabling template tests, then I'll approve and we can get this merged!
Co-Authored-By: vyasr <vramasub@umich.edu>
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.
Fantastic work! We'll make incremental edits as we beta-test, but I'm ready to merge. @b-butler you can do the honors once tests pass.
Description
Goal of this branch is to create a grouping feature that will allow for operations in
FlowProject
to be organized into "metaoperations." Currently to impliment this behavior either a new
FlowProject
has to operate on the original set of operations or user commenting has to bedone to prevent the group operations from running individually.
An example snippet of expected functional shows in more detail a potential API and use
of the feature,
Then to use the grouping a command like,
submit --group a_group
would output a job for the scheduler with the final command being something
akin to
python project.py run -j abc123 -o foo bar
Motivation and Context
This change is a feature change that seeks to give the user more control over the workflow
of their project. The group concept will allow for operations to be tagged to be run at once
in a single job which can work even if the pre and post conditions are not met initially but will
be once other operations have run.
This abstraction of a workflow is useful for multiple scenerios such as automatically restricting
operations to particular environements, running a job repeatedly in a single submit #4 , and moving
workflow logic into the
FlowProject
and not the individual operations for idiomatic code. Another usecase would to be mark operations as submit only #33 . Another issue tangentially related would be #41 as groups could be considered to create graphs themselves or groups might make up higher
level graphs.
Types of Changes
1The change breaks (or has the potential to break) existing functionality.
Checklist:
If necessary: