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(pipeline): define general time limit attribute #212

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

pbelmann
Copy link
Member

This PR introduces a concept that addresses point 3 in #210 and solves #199 .
The current concept is only applied to the quality control module as a general demonstration.
If this PR is merged, this concept can and should be applied to all processes.

Example Configuration

steps:
  qc:
    fastp:
       # Example params: " --cut_front --cut_tail --detect_adapter_for_pe  "
       additionalParams: "  "
       timeLimit: "AUTO"

The user is able to the following values for the timeLimit attribute:

  • DISABLED: Disable any time limit
  • AUTO (default): If the default resource configuration of a process is reduced then the time limit is scaled up.
  • NUMBER: A numeric value (in hours) can be directly set by the user.

Before merge:

  • The PR must be reviewed by one of the team members.

  • Please check if anything in the Readme must be adjusted, or added (development-setup, production-setup, user-guide).

  • PRs with new modules or workflow interfaces must include tests according to the developer guidelines.

  • The new code is readable, well commented and should adhere to our developer guidelines.

  • Before merging it must be checked if a squash of commits is required.

@pbelmann pbelmann requested a review from bosterholz July 22, 2022 07:17
Copy link
Collaborator

@bosterholz bosterholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top! Can be merged after comments are resolved.

lib/Utils.groovy Outdated
def timeLimit = defaultCPUs/flavor.cpus * processDefaults.time;
return timeLimit + timeUnit;
} else {
return "";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get this else part. If my chosen flavor has more cores than default, then no time limit is set?
Issue #199 could happen again with no time limit.
I would think that in this case the default time should be used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree!

@@ -73,11 +73,12 @@ Given a version number MAJOR.MINOR.PATCH, increment the:

## Process

1. Process names should start `p`.
Process names should start `p`. The input and output of processes should contain a sample and/or bin and contig id.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Process names should start `p`. The input and output of processes should contain a sample and/or bin and contig id.
Process names should start with a `p`. The in- and output of processes should contain a sample and/or a bin and contig id.


2. The input and output of processes should contain a sample and/or bin and contig id.
### Pocesses should publish process specific files
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Pocesses should publish process specific files
### Processes should publish process specific files


3. Pocesses should publish `.command.sh`, `.command.out`, `.command.log` and `.command.err` files but never `.command.run`.
Pocesses should publish `.command.sh`, `.command.out`, `.command.log` and `.command.err` files but never `.command.run`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Pocesses should publish `.command.sh`, `.command.out`, `.command.log` and `.command.err` files but never `.command.run`.
Processes should publish `.command.sh`, `.command.out`, `.command.log` and `.command.err` files but never `.command.run`.

4. Custom error strategies that do not follow the strategy defined in nextflow.config, should be documented (see Megahit example).
### Time Limit

Every process must define time limit which will never be reached on "normal" execution. This limit is only useful for errors in the execution environment
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Every process must define time limit which will never be reached on "normal" execution. This limit is only useful for errors in the execution environment
Every process must define a time limit which will never be reached on "normal" execution. This limit is only useful for errors in the execution environment

Every process must define time limit which will never be reached on "normal" execution. This limit is only useful for errors in the execution environment
which could lead to an endless execution of the process.

You can use setTimeLimit helper method to add a user configurable time limit.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can use setTimeLimit helper method to add a user configurable time limit.
You can use the setTimeLimit helper method to add a user configurable time limit.

@pbelmann pbelmann force-pushed the feature/time-limit-handling branch from 18803a6 to ac800a8 Compare August 1, 2022 08:32
@pbelmann pbelmann force-pushed the feature/time-limit-handling branch from ac800a8 to 5fd0cb9 Compare August 1, 2022 08:56
@pbelmann pbelmann merged commit 509f1e3 into dev Aug 2, 2022
@pbelmann pbelmann deleted the feature/time-limit-handling branch August 2, 2022 06:56
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.

2 participants