Skip to content

Commit d4479fd

Browse files
authored
Remove quasi-monitoring checkpoint file dfk.pkl (#3760)
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. # Changed Behaviour Checkpoints will no longer contain the light monitoring data that was previously in `dfk.pkl`. Users will have to get that information some other way (for example, by looking at the location of the checkpoint directory to discover the run directory, and by using Parsl's monitoring facility for task counts) ## Type of change - Code maintenance/cleanup
1 parent 7a4b826 commit d4479fd

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)