Commit 41fdc4ec authored by syz's avatar syz
Browse files

Small edits for resuming computation

parent ac711b42
...@@ -215,6 +215,7 @@ class Process(object): ...@@ -215,6 +215,7 @@ class Process(object):
""" """
The purpose of this function is to allow processes to resume from partly computed results The purpose of this function is to allow processes to resume from partly computed results
Start with self.h5_results_grp
""" """
raise NotImplementedError('Please override the _get_existing_datasets specific to your process') raise NotImplementedError('Please override the _get_existing_datasets specific to your process')
...@@ -231,9 +232,12 @@ class Process(object): ...@@ -231,9 +232,12 @@ class Process(object):
------- -------
""" """
if self._start_pos == 0:
self._create_results_datasets() # starting fresh
self._start_pos = 0 self._create_results_datasets()
else:
# resuming from previous checkpoint
self._get_existing_datasets()
self._read_data_chunk() self._read_data_chunk()
while self.data is not None: while self.data is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment