Unverified Commit 0172968f authored by guoshzhao's avatar guoshzhao Committed by GitHub
Browse files

add _post_process() interface. (#40)


Co-authored-by: default avatarGuoshuai Zhao <guzhao@microsoft.com>
parent c74f4879
......@@ -109,6 +109,14 @@ def _preprocess(self):
return True
def _postprocess(self):
"""Postprocess/cleanup operations after the benchmarking.
Return:
True if _postprocess() succeed.
"""
return True
@abstractmethod
def _benchmark(self):
"""Implementation for benchmarking."""
......@@ -134,6 +142,9 @@ def run(self):
if not self.__check_result_format():
return False
if not self._postprocess():
return False
return True
def __check_result_format(self):
......
......@@ -18,7 +18,8 @@ class ReturnCode(Enum):
MODEL_TRAIN_FAILURE = 11
MODEL_INFERENCE_FAILURE = 12
DISTRIBUTED_SETTING_INIT_FAILURE = 13
DATASET_GENERATION_FAILURE = 14
DATALOADER_INIT_FAILURE = 15
OPTIMIZER_CREATION_FAILURE = 16
MODEL_CREATION_FAILURE = 17
DISTRIBUTED_SETTING_DESTROY_FAILURE = 14
DATASET_GENERATION_FAILURE = 15
DATALOADER_INIT_FAILURE = 16
OPTIMIZER_CREATION_FAILURE = 17
MODEL_CREATION_FAILURE = 18
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