fix: improve runtime complexity of post-job checkpoint handling#3096
fix: improve runtime complexity of post-job checkpoint handling#3096johanneskoester merged 2 commits intomainfrom
Conversation
WalkthroughThe changes introduce a new internal state management system for checkpoint jobs in the Snakemake job dependency graph. A set named Changes
Possibly related PRs
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Files skipped from review as they are similar to previous changes (1)
Additional context usedPath-based instructions (1)
Additional comments not posted (4)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- snakemake/dag.py (6 hunks)
Additional context used
Path-based instructions (1)
snakemake/dag.py (1)
Pattern
**/*.py: Do not try to improve formatting.
Do not suggest type annotations for functions that are defined inside of functions or methods.
Do not suggest type annotation of theselfargument of methods.
Do not suggest type annotation of theclsargument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturnstatement.
Additional comments not posted (5)
snakemake/dag.py (5)
104-104: Proper initialization of_checkpoint_jobsInitializing
_checkpoint_jobsin the constructor ensures a clean state for tracking checkpoint jobs throughout the DAG lifecycle.
252-252: Efficient retrieval of checkpoint jobsReturning
self._checkpoint_jobsdirectly in thecheckpoint_jobsproperty enhances performance by avoiding redundant computation.
1339-1339: Clearing_checkpoint_jobsbefore updatingResetting
_checkpoint_jobsat the start ofupdate_needrunprevents stale checkpoint jobs from persisting across updates.
1418-1419: Accurate tracking of checkpoint jobs inupdate_needrunBy adding jobs where
job.is_checkpointisTrueto_checkpoint_jobs, we ensure that all checkpoint jobs are correctly tracked during the need-run analysis.
1906-1906: Removing finished checkpoint jobs from trackingUpdating
_checkpoint_jobswithdifference_updateafter job completion maintains the accuracy of the checkpoint job set.
|
🤖 I have created a release *beep* *boop* --- ## [8.20.4](v8.20.3...v8.20.4) (2024-09-20) ### Bug Fixes * cache conda envs to fix performance regression introduced in #1300 ([#3093](#3093)) ([66600c4](66600c4)) * Flatten conda pip dependencies for report rule info ([#3085](#3085)) ([56a1f20](56a1f20)) * improve runtime complexity of post-job checkpoint handling ([#3096](#3096)) ([ba30781](ba30781)) ### Documentation * Clarify the lookup function docstring ([#3091](#3091)) ([94177d5](94177d5)) * Update lookup signature ([#3090](#3090)) ([655d6a1](655d6a1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>



QC
docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).Summary by CodeRabbit
New Features
Bug Fixes
Improvements