Skip to content

Commit 69dd254

Browse files
Parameterize # of seed examples when converting to test data
Instead of hardcoding this to always be 3, add a parameter with a default of 3 when converting our seed examples to the test output dataset. Co-authored-by: Aakanksha Duggal <aduggal@redhat.com> Signed-off-by: Ben Browning <ben324@gmail.com>
1 parent f84902f commit 69dd254

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/instructlab/sdg/generate_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ def _gen_train_data(
123123
jldump(messages_data, output_file_messages)
124124

125125

126-
def _knowledge_seed_example_to_test_data(seed_example, system_prompt):
126+
def _knowledge_seed_example_to_test_data(seed_example, system_prompt, num_iterations=3):
127127
res = []
128-
for i in range(3):
128+
for i in range(num_iterations):
129129
idx = i + 1
130130
user = seed_example[f"icl_query_{idx}"] + "\n" + seed_example["icl_document"]
131131
test_sample = {

0 commit comments

Comments
 (0)