|
29 | 29 | from parsl.dataflow.dependency_resolvers import SHALLOW_DEPENDENCY_RESOLVER |
30 | 30 | from parsl.dataflow.errors import DependencyError, JoinError |
31 | 31 | from parsl.dataflow.futures import AppFuture |
32 | | -from parsl.dataflow.memoization import Memoizer |
| 32 | +from parsl.dataflow.memoization import BasicMemoizer, Memoizer |
33 | 33 | from parsl.dataflow.rundirs import make_rundir |
34 | 34 | from parsl.dataflow.states import FINAL_FAILURE_STATES, FINAL_STATES, States |
35 | 35 | from parsl.dataflow.taskrecord import TaskRecord |
@@ -167,11 +167,12 @@ def __init__(self, config: Config) -> None: |
167 | 167 |
|
168 | 168 | # TODO: the parameters that remain here should be parameters that are going to be configured by |
169 | 169 | # the user as part of checkpoint/memo configuration object. |
170 | | - self.memoizer = Memoizer(memoize=config.app_cache, |
171 | | - checkpoint_mode=config.checkpoint_mode, |
172 | | - checkpoint_files=config.checkpoint_files, |
173 | | - checkpoint_period=config.checkpoint_period) |
| 170 | + self.memoizer: Memoizer = BasicMemoizer(memoize=config.app_cache, |
| 171 | + checkpoint_mode=config.checkpoint_mode, |
| 172 | + checkpoint_files=config.checkpoint_files, |
| 173 | + checkpoint_period=config.checkpoint_period) |
174 | 174 | self.memoizer.run_dir = self.run_dir |
| 175 | + |
175 | 176 | self.memoizer.start() |
176 | 177 |
|
177 | 178 | self._modify_checkpointable_tasks_lock = threading.Lock() |
@@ -1234,6 +1235,10 @@ def cleanup(self) -> None: |
1234 | 1235 | # should still see it. |
1235 | 1236 | logger.info("DFK cleanup complete") |
1236 | 1237 |
|
| 1238 | + # TODO: this should maybe go away: manual explicit checkponting is |
| 1239 | + # a property of the (upcoming) BasicMemoizer, not of a memoisation |
| 1240 | + # plugin in general -- configure a BasicMemoizer separately from the |
| 1241 | + # DFK and call checkpoint on that... |
1237 | 1242 | def checkpoint(self) -> None: |
1238 | 1243 | with self._modify_checkpointable_tasks_lock: |
1239 | 1244 | self.memoizer.checkpoint() |
|
0 commit comments