-
Notifications
You must be signed in to change notification settings - Fork 1
DM-52585:set task dependency #96
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| add parts to set task dependency |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It feels like some of the iDDS implementation details (deps structure as well as appending to the dependency_tasks) could be put in an iDDS client function so that multiple lines of code don't have to be repeated in ctrl_bps_panda as well as generically better. Since this is important to get Rubin running better, I'm not asking for this to be done with this ticket, but after seeing how these changes work in production perhaps create a dependency-related function (that handles both a given update name for the deps as well as saving the parent in the dependency_tasks) in the iDDS client and update ctrl_bps_panda then.
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.
In the latest iDDS client, I already have such functions (It will check dependency_task. If it's not set, the client will generate it). I adapt it in the ctrl_bps_panda here because I found that this part scans all jobs and want to avoid looping the dependency_map again (to find the task dependency, I need to go through all jobs). For a small task, scan the dependency_map is ok. For recent big workflows, with 100 tasks and with many 1M dependencies for 10K jobs in one task, the scanning is expensive.
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.
To clarify, a function that creates it after entire workflow is created is not what I mean. I meant something like
work.add_dependency(task_name, parent_task_name, inputname)that would make the dependency_map and dependency_tasks entries. It shouldn't be any more expensive than this new ctrl_bps_panda code and the internal details can be hidden from ctrl_bps_panda code.Speaking of speed, have you tried a set for dependency_tasks?
if parent_task_name not in work.dependency_tasks: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.
oh. I missunderstood. I will add these functions in the idds client, then we can optimize ctrl_bps_panda. Thanks.