Skip to content

Commit

Permalink
fix empty prompters bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristyKoh committed Apr 12, 2023
1 parent c71bf1c commit 1ec5787
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elk/extraction/prompt_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def load_prompts(
if combined_prompter:
combined_prompter.templates.update(prompter.get_templates_with_new_uuids())
print("len of prompter templates is ", len(combined_prompter.templates))
prompters.append(DatasetTemplates(ds_name, config_name))
prompters.append(DatasetTemplates(ds_name, config_name))

ds_dict = assert_type(
dict, load_dataset(ds_name, config_name or None, streaming=stream)
Expand Down Expand Up @@ -150,7 +150,7 @@ def load_prompts(
train_datasets.append(train_ds)

min_num_templates = -1
if combined_prompter != None:
if combined_prompter:
# save combined templates to yaml file
print("saving aggregate templates")
combined_prompter.sync_mapping()
Expand Down

0 comments on commit 1ec5787

Please sign in to comment.