Skip to content
Snippets Groups Projects
Commit d8a5f185 authored by Grießhaber Daniel's avatar Grießhaber Daniel :squid:
Browse files

log and return correct prompts in get_initial_prompts

parent db61291e
No related branches found
No related tags found
No related merge requests found
...@@ -129,13 +129,15 @@ class PromptOptimization: ...@@ -129,13 +129,15 @@ class PromptOptimization:
initial_population += paraphrases initial_population += paraphrases
logger.info( logger.info(
"Paraphrased prompt '%s': %s.", "Paraphrased prompt '%s': %s.",
self.task.base_prompts[0].replace("\r", "\\r").replace("\n", "\\n"), top_prompts[promptindex_to_paraphrase]
.replace("\r", "\\r")
.replace("\n", "\\n"),
paraphrases, paraphrases,
) )
promptindex_to_paraphrase += 1 promptindex_to_paraphrase += 1
promptindex_to_paraphrase %= len(top_prompts) promptindex_to_paraphrase %= len(top_prompts)
return self.task.base_prompts + paraphrases return initial_population
def add_prompt( def add_prompt(
self, self,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment