File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
aiu_fms_testing_utils/utils Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,8 @@ def __sample_requests(
425425 )
426426 enforced_dataset .append ((truncated_prompt , truncate_to_size ))
427427 enforce_sizes_with_truncation .remove (truncation_found )
428+ # This condition allows adding prompts to the final dataset as long as there is
429+ # sufficient space allocated for sizes that need to be enforced.
428430 if (
429431 not truncation_found
430432 and current_padded_size not in enforce_sizes
@@ -456,7 +458,7 @@ def __sample_requests(
456458 filtered_dataset = _merge_enforce_keep_heterogeneous (
457459 enforced_dataset , filtered_dataset , num_requests
458460 )
459- elif enforced_dataset and not enforce_heterogeneous :
461+ elif enforced_dataset :
460462 filtered_dataset = enforced_dataset + filtered_dataset
461463
462464 if len (filtered_dataset ) != num_requests :
You can’t perform that action at this time.
0 commit comments