-
Notifications
You must be signed in to change notification settings - Fork 605
fix: improve runtime complexity of post-job checkpoint handling #3096
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 theself
argument of methods.
Do not suggest type annotation of thecls
argument of classmethods.
Do not suggest return type annotation if a function or method does not contain areturn
statement.
Additional comments not posted (5)
snakemake/dag.py (5)
104-104
: Proper initialization of_checkpoint_jobs
Initializing
_checkpoint_jobs
in the constructor ensures a clean state for tracking checkpoint jobs throughout the DAG lifecycle.
252-252
: Efficient retrieval of checkpoint jobsReturning
self._checkpoint_jobs
directly in thecheckpoint_jobs
property enhances performance by avoiding redundant computation.
1339-1339
: Clearing_checkpoint_jobs
before updatingResetting
_checkpoint_jobs
at the start ofupdate_needrun
prevents stale checkpoint jobs from persisting across updates.
1418-1419
: Accurate tracking of checkpoint jobs inupdate_needrun
By adding jobs where
job.is_checkpoint
isTrue
to_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_jobs
withdifference_update
after 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