Skip to content

Commit 51762f6

Browse files
committed
Remove quasi-monitoring checkpoint file dfk.pkl
This file is saved alongside checkpoints, but stores an extremely light summary of DFK state rather than of checkpoints: the DFK's task count and run directory path. That is information that falls into the space of monitoring, not of checkpointing - so this PR removes that file, in favour of the much richer monitoring database.
1 parent 7a4b826 commit 51762f6

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

parsl/dataflow/dflow.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ def checkpoint(self, tasks: Optional[Sequence[TaskRecord]] = None) -> str:
12631263
Returns:
12641264
Checkpoint dir if checkpoints were written successfully.
12651265
By default the checkpoints are written to the RUNDIR of the current
1266-
run under RUNDIR/checkpoints/{tasks.pkl, dfk.pkl}
1266+
run under RUNDIR/checkpoints/tasks.pkl
12671267
"""
12681268
with self.checkpoint_lock:
12691269
if tasks:
@@ -1273,18 +1273,11 @@ def checkpoint(self, tasks: Optional[Sequence[TaskRecord]] = None) -> str:
12731273
self.checkpointable_tasks = []
12741274

12751275
checkpoint_dir = '{0}/checkpoint'.format(self.run_dir)
1276-
checkpoint_dfk = checkpoint_dir + '/dfk.pkl'
12771276
checkpoint_tasks = checkpoint_dir + '/tasks.pkl'
12781277

12791278
if not os.path.exists(checkpoint_dir):
12801279
os.makedirs(checkpoint_dir, exist_ok=True)
12811280

1282-
with open(checkpoint_dfk, 'wb') as f:
1283-
state = {'rundir': self.run_dir,
1284-
'task_count': self.task_count
1285-
}
1286-
pickle.dump(state, f)
1287-
12881281
count = 0
12891282

12901283
with open(checkpoint_tasks, 'ab') as f:

parsl/tests/test_checkpointing/test_python_checkpoint_1.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,5 @@ def test_initial_checkpoint_write():
2727

2828
cpt_dir = parsl.dfk().checkpoint()
2929

30-
cptpath = cpt_dir + '/dfk.pkl'
31-
assert os.path.exists(cptpath), f"DFK checkpoint missing: {cptpath}"
32-
3330
cptpath = cpt_dir + '/tasks.pkl'
3431
assert os.path.exists(cptpath), f"Tasks checkpoint missing: {cptpath}"

0 commit comments

Comments
 (0)