From af57537ec78594e74db3acadf8107bd646e01db8 Mon Sep 17 00:00:00 2001 From: Peihan Date: Tue, 13 Oct 2020 09:58:33 +0800 Subject: [PATCH] remove dy2static test_lac predictor run case (#27844) * remove test_lac predictor run case --- .../unittests/dygraph_to_static/test_lac.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py index d8cb3854d3e..c9bc8cc647d 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py @@ -28,8 +28,6 @@ from paddle.fluid.dygraph import Embedding, Linear, GRUUnit from paddle.fluid.dygraph import declarative, ProgramTranslator from paddle.fluid.dygraph.io import INFER_MODEL_SUFFIX, INFER_PARAMS_SUFFIX -from predictor_utils import PredictorTools - SEED = 2020 program_translator = ProgramTranslator() @@ -540,7 +538,6 @@ class TestLACModel(unittest.TestCase): dy_pre = self.predict_dygraph(batch) st_pre = self.predict_static(batch) dy_jit_pre = self.predict_dygraph_jit(batch) - predictor_pre = self.predict_analysis_inference(batch) self.assertTrue( np.allclose(dy_pre, st_pre), msg="dy_pre:\n {}\n, st_pre: \n{}.".format(dy_pre, st_pre)) @@ -548,10 +545,6 @@ class TestLACModel(unittest.TestCase): np.allclose(dy_jit_pre, st_pre), msg="dy_jit_pre:\n {}\n, st_pre: \n{}.".format(dy_jit_pre, st_pre)) - self.assertTrue( - np.allclose(predictor_pre, st_pre), - msg="predictor_pre:\n {}\n, st_pre: \n{}.".format(predictor_pre, - st_pre)) def predict_dygraph(self, batch): words, targets, length = batch @@ -602,15 +595,6 @@ class TestLACModel(unittest.TestCase): return pred_res.numpy() - def predict_analysis_inference(self, batch): - words, targets, length = batch - - output = PredictorTools(self.args.model_save_dir, - self.args.model_filename, - self.args.params_filename, [words, length]) - out = output() - return out - if __name__ == "__main__": unittest.main() -- GitLab