Add retry logic for failed BEAST2 simulations with cleanup#51
Draft
Copilot wants to merge 5 commits into
Draft
Conversation
Co-authored-by: aezarebski <36244258+aezarebski@users.noreply.github.com>
Co-authored-by: aezarebski <36244258+aezarebski@users.noreply.github.com>
…ssues Co-authored-by: aezarebski <36244258+aezarebski@users.noreply.github.com>
Co-authored-by: aezarebski <36244258+aezarebski@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve error handling for failed simulations
Add retry logic for failed BEAST2 simulations with cleanup
Jan 5, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Failed simulations were not being handled gracefully—they would leave behind intermediate files and not attempt recovery. This adds automatic retry with seed increment and proper cleanup.
Changes
max_retriestimes (default: 3) with an incremented seed.treeand.trajfiles before each retry; cleans up.timefile only on final failurebeast_seed_stris a valid integer upfront.timefile now records total elapsed time across all attempts (only written on success)Usage
The function signature adds an optional
max_retriesparameter:Each retry uses seed
base_seed + attempt - 1, so attempts get seeds 42, 43, 44 for a base seed of 42.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.