Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion contrib/admin/mypy-with-ignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def main():
'docs/conf.py',
'docs/vendor/sphinxcontrib/fulltoc.py',
'docs/vendor/sphinxcontrib/__init__.py',
'src/toil/job.py',
'src/toil/leader.py',
'src/toil/__init__.py',
'src/toil/deferred.py',
Expand Down
8 changes: 7 additions & 1 deletion docs/running/cliOptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,14 @@ systems have issues!).
--retryCount INT
Number of times to retry a failing job before giving
up and labeling job failed. default=1
--retryBackoffSeconds FLOAT
Number of seconds to wait when first retrying a job.
default=2
--retryBackoffFactor FLOAT
Factor to increase retry backof time by for each
additional retry. default=3
--stopOnFirstFailure BOOL
Stop the workflow at the first complete job failure.
Stop the workflow at the first complete job failure.
--enableUnlimitedPreemptibleRetries
If set, preemptible failures (or any failure due to an
instance getting unexpectedly terminated) will not count
Expand Down
4 changes: 4 additions & 0 deletions src/toil/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ class Config:

# Retrying/rescuing jobs
retryCount: int
retry_backoff_seconds: float
retry_backoff_factor: float
stop_on_first_failure: bool
enableUnlimitedPreemptibleRetries: bool
doubleMem: bool
Expand Down Expand Up @@ -397,6 +399,8 @@ def set_option(option_name: str, old_names: list[str] | None = None) -> None:

# Retrying/rescuing jobs
set_option("retryCount")
set_option("retry_backoff_seconds")
set_option("retry_backoff_factor")
set_option("stop_on_first_failure")
set_option("enableUnlimitedPreemptibleRetries")
set_option("doubleMem")
Expand Down
2 changes: 0 additions & 2 deletions src/toil/cwl/cwltoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -2939,14 +2939,12 @@ def makeRootJob(
# Get metadata for non-tool input files
input_metadata = get_file_sizes(
input_filenames,
toil._jobStore,
include_remote_files=options.reference_inputs,
)

# Also get metadata for tool input files, so we can resilve them to candidate URIs
tool_metadata = get_file_sizes(
input_filenames,
toil._jobStore,
include_remote_files=options.reference_inputs,
)

Expand Down
6 changes: 5 additions & 1 deletion src/toil/deferred.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import tempfile
from collections import namedtuple
from contextlib import contextmanager
from typing import Any, Callable
from typing_extensions import ParamSpec

import dill

Expand All @@ -40,8 +42,10 @@ class DeferredFunction(
True
"""

P = ParamSpec("P")

@classmethod
def create(cls, function, *args, **kwargs):
def create(cls, function: Callable[P, Any], *args: P.args, **kwargs: P.kwargs):
"""
Capture the given callable and arguments as an instance of this class.

Expand Down
Loading