From 09bca67395f11c172d8a63c6eeff8b6386baab22 Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Fri, 16 Nov 2018 15:40:22 +0800 Subject: [PATCH] add check if the model does not save model test=develop --- python/paddle/fluid/tests/book/test_label_semantic_roles.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/paddle/fluid/tests/book/test_label_semantic_roles.py b/python/paddle/fluid/tests/book/test_label_semantic_roles.py index 91ea6743989..3d40b762281 100644 --- a/python/paddle/fluid/tests/book/test_label_semantic_roles.py +++ b/python/paddle/fluid/tests/book/test_label_semantic_roles.py @@ -208,6 +208,10 @@ def train(use_cuda, save_dirname=None, is_local=True): batch_id = batch_id + 1 + raise RuntimeError( + "This model should save_inference_model and return, but not reach here, please check!" + ) + if is_local: train_loop(fluid.default_main_program()) else: -- GitLab