Skip to content

Commit 142b5ed

Browse files
authored
Merge pull request #14450 from jacquesqiao/fix-test-label-sentiment
change the target cost of test_label_semantic_roles to speed up test
2 parents 1722678 + 09bca67 commit 142b5ed

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

python/paddle/fluid/tests/book/test_label_semantic_roles.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
mix_hidden_lr = 1e-3
3939

4040
IS_SPARSE = True
41-
PASS_NUM = 1
41+
PASS_NUM = 2
4242
BATCH_SIZE = 10
4343

4444
embedding_name = 'emb'
@@ -196,7 +196,7 @@ def train_loop(main_program):
196196
print("second per batch: " + str((time.time(
197197
) - start_time) / batch_id))
198198
# Set the threshold low to speed up the CI test
199-
if float(cost) < 60.0:
199+
if float(cost) < 80.0:
200200
if save_dirname is not None:
201201
# TODO(liuyiqun): Change the target to crf_decode
202202
fluid.io.save_inference_model(save_dirname, [
@@ -208,6 +208,10 @@ def train_loop(main_program):
208208

209209
batch_id = batch_id + 1
210210

211+
raise RuntimeError(
212+
"This model should save_inference_model and return, but not reach here, please check!"
213+
)
214+
211215
if is_local:
212216
train_loop(fluid.default_main_program())
213217
else:

0 commit comments

Comments
 (0)