feat: add max_time_hr
option for wall-time allocation (issue #334)
#335
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.
What
This PR introduces a new optional configuration parameter,
max_time_hr
. Users can specify an integer value representing the maximum wall-time allocation in hours. This feature specifically applies to the time-intensive rulessample_concordance_plink
andpopulation_level_ibd
.When
max_time_hr
is set, these two rules will receive their maximum time allocation immediately. If not specified, wall-time allocation will follow the default patterns:{1: 10, 2: 48, 3: 96}
forsample_concordance_plink
{1: 8, 2: 24, 3: 48}
forpopulation_level_ibd
Additionally, we improved the memory allocation for the
population_level_ibd
rule to a data driven approach, similar to commit f672fba.Why
This update offers two key benefits. First, if a user has a smaller wall-time limit than the default allocations (e.g., 36 hours), jobs may fail if they do not complete on the first attempt. For instance, if the initial allocation for the
sample_concordance_plink
rule is 10 hours and the next attempt is 48 hours, which exceeds the maximum allowed allocation, the job will fail. The new configuration prevents this issue.Second, for users processing relatively large sample sizes (greater than 100K), the default 10-hour allocation for the
sample_concordance_plink
rule may be insufficient. By specifying a larger time allocation upfront, users can avoid the risk of failure due to wall-time limits, potentially saving time by reducing unnecessary retries.Fixes #334