|
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 |
@@ -165,11 +165,12 @@ def __init__(self, config: Config) -> None: |
165 | 165 | self.monitoring_radio.send((MessageType.WORKFLOW_INFO, |
166 | 166 | workflow_info)) |
167 | 167 |
|
168 | | - self.memoizer = Memoizer(memoize=config.app_cache, |
169 | | - checkpoint_mode=config.checkpoint_mode, |
170 | | - checkpoint_files=config.checkpoint_files, |
171 | | - checkpoint_period=config.checkpoint_period) |
| 168 | + self.memoizer: Memoizer = BasicMemoizer(memoize=config.app_cache, |
| 169 | + checkpoint_mode=config.checkpoint_mode, |
| 170 | + checkpoint_files=config.checkpoint_files, |
| 171 | + checkpoint_period=config.checkpoint_period) |
172 | 172 | self.memoizer.run_dir = self.run_dir |
| 173 | + |
173 | 174 | self.memoizer.start() |
174 | 175 |
|
175 | 176 | # this must be set before executors are added since add_executors calls |
@@ -1205,6 +1206,10 @@ def cleanup(self) -> None: |
1205 | 1206 | # should still see it. |
1206 | 1207 | logger.info("DFK cleanup complete") |
1207 | 1208 |
|
| 1209 | + # TODO: this should maybe go away: manual explicit checkponting is |
| 1210 | + # a property of the (upcoming) BasicMemoizer, not of a memoisation |
| 1211 | + # plugin in general -- configure a BasicMemoizer separately from the |
| 1212 | + # DFK and call checkpoint on that... |
1208 | 1213 | def checkpoint(self) -> None: |
1209 | 1214 | self.memoizer.checkpoint() |
1210 | 1215 |
|
|
0 commit comments