mirror of
https://github.com/wassname/discovering_latent_knowledge.git
synced 2026-09-12 12:13:04 +08:00
fix for amazon_polarity where answers have a newline first
This commit is contained in:
@@ -226,7 +226,7 @@ def _convert_to_prompts(
|
||||
fewshot_examples = next(fewshot_iter)
|
||||
if instructed_to_lie: fewshot_examples = [{**e, 'label': ~e['label']} for e in fewshot_examples]
|
||||
fewshot_texts = [
|
||||
dict(user=q, response=a) for q, a in map(template.apply, fewshot_examples)
|
||||
dict(user=q, response=a.strip()) for q, a in map(template.apply, fewshot_examples)
|
||||
]
|
||||
prompt_parts = fewshot_texts + prompt_parts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user