From 396c3aa2c24d1df1d799f02227cb7f7aa7b110aa Mon Sep 17 00:00:00 2001 From: panghongjun Date: Thu, 25 Feb 2021 15:39:47 +0800 Subject: [PATCH] check job info --- tf_adapter/python/npu_bridge/estimator/npu/npu_estimator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tf_adapter/python/npu_bridge/estimator/npu/npu_estimator.py b/tf_adapter/python/npu_bridge/estimator/npu/npu_estimator.py index a06b9a38c..44f1b8ab1 100644 --- a/tf_adapter/python/npu_bridge/estimator/npu/npu_estimator.py +++ b/tf_adapter/python/npu_bridge/estimator/npu/npu_estimator.py @@ -377,7 +377,9 @@ class NPUEstimator(estimator_lib.Estimator): config = self.__load_graph_optimizers(config) # Init npu system: get task and device info from configuration file. - self.__load_job_info(job_start_file) + if !(self.__load_job_info(job_start_file)): + raise ValueError( + '`config` must be provided with type `NPUConfigs`') # Check modie dir in NPUEstimator and NPURunConfig model_dir = self.__check_model_dir(model_dir, config) -- Gitee