DM-52585:set task dependency#96
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #96 +/- ##
==========================================
- Coverage 32.38% 32.18% -0.20%
==========================================
Files 12 12
Lines 1130 1137 +7
Branches 189 191 +2
==========================================
Hits 366 366
- Misses 752 759 +7
Partials 12 12 ☔ View full report in Codecov by Sentry. |
MichelleGower
left a comment
There was a problem hiding this comment.
One suggestion for future ticket. As well as my recurring unit tests request. For my part, merge approved.
| } | ||
| ) | ||
| if parent_task_name not in work.dependency_tasks: | ||
| work.dependency_tasks.append(parent_task_name) |
There was a problem hiding this comment.
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.
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.
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.
oh. I missunderstood. I will add these functions in the idds client, then we can optimize ctrl_bps_panda. Thanks.
Checklist
doc/changes