in tensorflow_datasets/text/star_cfq/star_cfq.py [0:0]
def _generate_blended_split_builder_configs():
"""Generate configs for blended random splits."""
configs = []
split_archive_path = 'splits/star-cfq-random-splits-1.0.tar.gz'
for supplementary_pool in _SUPPLEMENTARY_POOLS:
for initial_size in _BLENDING_INITIAL_SIZES:
for supplementary_size in _BLENDING_SUPPLEMENTARY_SIZES:
# Some splits with 80x n-CFQ/half-n-CFQ sizes are missing, skip them.
if supplementary_size == 80 and (supplementary_pool in ['n', 'half_n']
or initial_size not in [0, 0.1, 1]):
continue
if initial_size != 0:
configs.append(
StarCFQConfig(
name=f'equal_weighting_{initial_size}x_b_cfq_{supplementary_size}x_{supplementary_pool}_cfq',
split_archive_path=split_archive_path,
split_path=f'random_splits/train_{initial_size}x_b_cfq_{supplementary_size}x_{supplementary_pool}_cfq__test_1x_b_cfq.json'
))
else:
configs.append(
StarCFQConfig(
name=f'equal_weighting_0x_b_cfq_{supplementary_size}x_{supplementary_pool}_cfq',
split_archive_path=split_archive_path,
split_path=f'random_splits/train_{supplementary_size}x_{supplementary_pool}_cfq__test_1x_b_cfq.json'
))
for unique_initial_size in _UNIQUE_INITIAL_SIZES:
for supplementary_pool in _SUPPLEMENTARY_POOLS:
for size in _OVERWEIGHTING_SIZES:
# Splits with 80x n-CFQ/half-n-CFQ sizes are missing, skip them for now.
if size == 80 and supplementary_pool in ['n', 'half_n']:
continue
# This split file is missing, skip it in this version.
if unique_initial_size == 1 and size == 1 and supplementary_pool == 'half_n':
continue
configs.append(
StarCFQConfig(
name=f'overweighting_{unique_initial_size}x_unique_{size}x_b_cfq_{size}x_{supplementary_pool}_cfq',
split_archive_path=split_archive_path,
split_path=f'random_splits/train_{unique_initial_size}x_unique_{size}x_b_cfq_{size}x_{supplementary_pool}_cfq__test_1x_b_cfq.json'
))
return configs