Skip to content

Commit 9baf7fc

Browse files
author
Peng Li
committed
Fix data provider bug in srl demo
Once encoutering a single sample whose size is larger than batch size, the provider will yield empty batch and terminate the current pass unexpectedly if can_over_batch_size=False.
1 parent b53bdcd commit 9baf7fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demo/semantic_role_labeling/dataprovider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def get_batch_size(yeild_data):
4343
init_hook=hook,
4444
should_shuffle=True,
4545
calc_batch_size=get_batch_size,
46-
can_over_batch_size=False,
46+
can_over_batch_size=True,
4747
cache=CacheType.CACHE_PASS_IN_MEM)
4848
def process(settings, file_name):
4949
with open(file_name, 'r') as fdata:

0 commit comments

Comments
 (0)