reduce_min_pool_size.py 257 字节
Newer Older
Y
Yu Yang 已提交
1 2 3 4 5
@provider(min_pool_size=0, ...)
def process(settings, filename):
    os.system('shuf %s > %s.shuf' % (filename, filename))  # shuffle before.
    with open('%s.shuf' % filename, 'r') as f:
        for line in f:
Y
Yu Yang 已提交
6
            yield get_sample_from_line(line)