Skip to content
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

feat: add max_time_hr option for wall-time allocation (issue #334) #335

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

jaamarks
Copy link
Collaborator

@jaamarks jaamarks commented Sep 28, 2024

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 rules sample_concordance_plink and population_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} for sample_concordance_plink
  • {1: 8, 2: 24, 3: 48} for population_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

@jaamarks jaamarks force-pushed the issue334/wall-time-option branch 2 times, most recently from f699252 to c59205a Compare September 28, 2024 20:44
- This introduces an optional `max_time_hr` config parameter to limit
  the execution time for the time-intensive rules `population_level_ibd`
  and `sample_concordance_plink`
- The memory allocation for the `population_level_ibd` rule is also
  improved so that it now scales dynamically with input file size.
@jaamarks jaamarks force-pushed the issue334/wall-time-option branch from c59205a to 9ef96ef Compare September 28, 2024 20:56
@jaamarks jaamarks merged commit 200c1ff into default Sep 28, 2024
2 checks passed
@jaamarks jaamarks deleted the issue334/wall-time-option branch October 2, 2024 12:03
jaamarks added a commit that referenced this pull request Oct 3, 2024
feat: Apply ``max_time_hr`` to sample_level_ibd rule (issue #334)

**What**
- Apply the ``max_time_hr`` feature to the ``sample_level_ibd`` rule within the ``sample_qc.smk`` sub-workflow.
- Update the ``workflow_params.py`` file to state all of the rules that ``max_time_hr`` affects.

**Why**
The ``sample_level_ibd`` rule is another time-intensive step in the pipeline, and can users have experienced timeout issues at this step when running it on large datasets with the standard time-allocation method. So this update ensures that if a user specifies ``max_time_hr`` in the ``config.yml``, it will allso apply to this rule.

This is and extension of PR #335.
Fixes #334
jaamarks added a commit that referenced this pull request Oct 3, 2024
feat: Apply ``max_time_hr`` to sample_level_ibd rule (issue #334)

**What**
- Apply the ``max_time_hr`` feature to the ``sample_level_ibd`` rule
  within the ``sample_qc.smk`` sub-workflow.
- Update the ``workflow_params.py`` file to state all of the rules that
  ``max_time_hr`` affects.

**Why**
- The ``sample_level_ibd`` rule is another time-intensive step in the
  pipeline, and can users have experienced timeout issues at this step
  when running it on large datasets with the standard time-allocation
  method. So this update ensures that if a user specifies ``max_time_hr``
  in the ``config.yml``, it will allso apply to this rule.

  This is an extension of PR #335
  Fixes #334
@jaamarks
Copy link
Collaborator Author

jaamarks commented Oct 15, 2024

This PR addresses part of issue #316 and issue #315.

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.

Add new config option to set max wall-time for cluster
1 participant