Skip to content

DM-52585:set task dependency#96

Merged
wguanicedew merged 1 commit into
mainfrom
tickets/DM-52585
Oct 7, 2025
Merged

DM-52585:set task dependency#96
wguanicedew merged 1 commit into
mainfrom
tickets/DM-52585

Conversation

@wguanicedew
Copy link
Copy Markdown
Contributor

@wguanicedew wguanicedew commented Oct 3, 2025

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.18%. Comparing base (a352d69) to head (510c54e).
⚠️ Report is 2 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
python/lsst/ctrl/bps/panda/utils.py 0.00% 7 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Contributor

@MichelleGower MichelleGower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor

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:

Copy link
Copy Markdown
Contributor Author

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.

@wguanicedew wguanicedew changed the title set task dependency DM-52585:set task dependency Oct 7, 2025
@wguanicedew wguanicedew merged commit 67050e7 into main Oct 7, 2025
16 of 18 checks passed
@wguanicedew wguanicedew deleted the tickets/DM-52585 branch October 7, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants