55from typing_extensions import Literal
66
77from parsl .dataflow .dependency_resolvers import DependencyResolver
8+ from parsl .dataflow .memoization import Memoizer
89from parsl .dataflow .taskrecord import TaskRecord
910from parsl .errors import ConfigurationError
1011from parsl .executors .base import ParslExecutor
@@ -27,17 +28,6 @@ class Config(RepresentationMixin, UsageInformation):
2728 executors : sequence of ParslExecutor, optional
2829 List (or other iterable) of `ParslExecutor` instances to use for executing tasks.
2930 Default is (:class:`~parsl.executors.threads.ThreadPoolExecutor()`,).
30- app_cache : bool, optional
31- Enable app caching. Default is True.
32- checkpoint_files : sequence of str, optional
33- List of paths to checkpoint files. See :func:`parsl.utils.get_all_checkpoints` and
34- :func:`parsl.utils.get_last_checkpoint` for helpers. Default is None.
35- checkpoint_mode : str, optional
36- Checkpoint mode to use, can be ``'dfk_exit'``, ``'task_exit'``, ``'periodic'`` or ``'manual'``.
37- If set to `None`, checkpointing will be disabled. Default is None.
38- checkpoint_period : str, optional
39- Time interval (in "HH:MM:SS") at which to checkpoint completed tasks. Only has an effect if
40- ``checkpoint_mode='periodic'``.
4131 dependency_resolver: plugin point for custom dependency resolvers. Default: only resolve Futures,
4232 using the `SHALLOW_DEPENDENCY_RESOLVER`.
4333 exit_mode: str, optional
@@ -100,14 +90,7 @@ class Config(RepresentationMixin, UsageInformation):
10090 @typeguard .typechecked
10191 def __init__ (self ,
10292 executors : Optional [Iterable [ParslExecutor ]] = None ,
103- app_cache : bool = True ,
104- checkpoint_files : Optional [Sequence [str ]] = None ,
105- checkpoint_mode : Union [None ,
106- Literal ['task_exit' ],
107- Literal ['periodic' ],
108- Literal ['dfk_exit' ],
109- Literal ['manual' ]] = None ,
110- checkpoint_period : Optional [str ] = None ,
93+ memoizer : Optional [Memoizer ] = None ,
11194 dependency_resolver : Optional [DependencyResolver ] = None ,
11295 exit_mode : Literal ['cleanup' , 'skip' , 'wait' ] = 'cleanup' ,
11396 garbage_collect : bool = True ,
@@ -131,21 +114,7 @@ def __init__(self,
131114 self ._executors : Sequence [ParslExecutor ] = executors
132115 self ._validate_executors ()
133116
134- self .app_cache = app_cache
135- self .checkpoint_files = checkpoint_files
136- self .checkpoint_mode = checkpoint_mode
137- if checkpoint_period is not None :
138- if checkpoint_mode is None :
139- logger .debug ('The requested `checkpoint_period={}` will have no effect because `checkpoint_mode=None`' .format (
140- checkpoint_period )
141- )
142- elif checkpoint_mode != 'periodic' :
143- logger .debug ("Requested checkpoint period of {} only has an effect with checkpoint_mode='periodic'" .format (
144- checkpoint_period )
145- )
146- if checkpoint_mode == 'periodic' and checkpoint_period is None :
147- checkpoint_period = "00:30:00"
148- self .checkpoint_period = checkpoint_period
117+ self .memoizer = memoizer
149118 self .dependency_resolver = dependency_resolver
150119 self .exit_mode = exit_mode
151120 self .garbage_collect = garbage_collect
0 commit comments