Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spar mt prompt invar #184

Merged
merged 55 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
7b68f5f
add boolq_pt template and christykoh as included user
ChristyKoh Mar 9, 2023
edfdd6d
add templates.yaml for boolqpt
ChristyKoh Mar 14, 2023
d285798
pt yaml
reaganjlee Mar 26, 2023
6c91be2
Merge remote-tracking branch 'origin/main' into spar_boolq_pt
reaganjlee Apr 5, 2023
0ff1609
add ag_news template, translated to pt
ChristyKoh Apr 5, 2023
7180a64
add ag_news template, translated to pt
ChristyKoh Apr 5, 2023
b8f5e8b
save eval runs to separate subfolders by target dataset
ChristyKoh Apr 7, 2023
51fed5d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 7, 2023
9cebbdd
Merge branch 'main' into spar_pt
ChristyKoh Apr 7, 2023
6be825a
Merge branch 'spar_boolq_pt' into spar_pt
ChristyKoh Apr 7, 2023
2660844
eval multiple datasets
ChristyKoh Apr 7, 2023
f35a6a8
Merge branch 'eval_dirs' of github.com:EleutherAI/elk into eval_dirs
ChristyKoh Apr 7, 2023
b230209
change prompt answer chouces to portuguese
ChristyKoh Apr 7, 2023
74c9915
add imdb_pt template
ChristyKoh Apr 11, 2023
85fd9e4
implement prompt sharing, generate combined templates.yaml
ChristyKoh Apr 11, 2023
8383f26
fix num templates logic
ChristyKoh Apr 12, 2023
df41ab4
fix pt answer choice
ChristyKoh Apr 12, 2023
c03742d
Merge branch 'spar_pt' of github.com:EleutherAI/elk into spar_mt_prom…
ChristyKoh Apr 12, 2023
e536aa6
Merge branch 'main' of github.com:EleutherAI/elk into main
ChristyKoh Apr 12, 2023
208200d
Merge branch 'main' into spar_pt
ChristyKoh Apr 12, 2023
a132f40
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 12, 2023
9f3f218
Merge branch 'spar_pt' of github.com:EleutherAI/elk into spar_mt_prom…
ChristyKoh Apr 12, 2023
c71bf1c
remove empty prompt_dataset file
ChristyKoh Apr 12, 2023
1ec5787
fix empty prompters bug
ChristyKoh Apr 12, 2023
66c7a6b
fix multiclass label bug
ChristyKoh Apr 12, 2023
d91acac
move prompt combination to PromptConfig post_init logic
ChristyKoh Apr 12, 2023
89b2346
Merge branch 'main' of github.com:EleutherAI/elk into main
ChristyKoh Apr 12, 2023
715bba8
Merge branch 'main' into spar_mt_prompt_invar
ChristyKoh Apr 12, 2023
0c2f5c4
fix refactor bugs, runnable state
ChristyKoh Apr 12, 2023
066cd44
rewrite template merging, regenerate prompter every run
ChristyKoh Apr 12, 2023
846b78c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 12, 2023
1aecd7e
line len fixes
ChristyKoh Apr 12, 2023
b7bbee0
Merge branch 'spar_mt_prompt_invar' of github.com:EleutherAI/elk into…
ChristyKoh Apr 12, 2023
b0c0f63
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 12, 2023
34bc364
Merge remote-tracking branch 'origin/main' into spar_mt_prompt_invar
ChristyKoh Apr 12, 2023
2da069a
update README with prompt invariance argument
ChristyKoh Apr 12, 2023
4c6d344
fix bugs, add dataset col checks
ChristyKoh Apr 12, 2023
53d186b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 12, 2023
b78355f
fix prompter init typing
ChristyKoh Apr 12, 2023
3486ded
Merge branch 'spar_mt_prompt_invar' of github.com:EleutherAI/elk into…
ChristyKoh Apr 12, 2023
1975410
Update README.md
lauritowal Apr 12, 2023
8a5fb0d
try to fix typing again
ChristyKoh Apr 12, 2023
6d46f7e
Merge branch 'spar_mt_prompt_invar' of github.com:EleutherAI/elk into…
ChristyKoh Apr 12, 2023
a7f5a8b
assert datasettemplates type
ChristyKoh Apr 12, 2023
ba090b7
Merge remote-tracking branch 'origin/main' into eval_dirs
ChristyKoh Apr 13, 2023
7af1a1b
bugfix to run eval separately on each dataset
ChristyKoh Apr 13, 2023
74551fa
add combine_evals flag to differentiate a multi dataset eval from a b…
ChristyKoh Apr 13, 2023
0b3d3c9
Merge branch 'main' of github.com:EleutherAI/elk into main
ChristyKoh Apr 19, 2023
d8cee8b
Merge branch 'main' into eval_dirs
ChristyKoh Apr 19, 2023
54aa710
Merge branch 'eval_dirs' into spar_mt_prompt_invar, separate combinin…
ChristyKoh Apr 19, 2023
f7a4713
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 19, 2023
6e2f54c
define ds_name
ChristyKoh Apr 19, 2023
3b0765d
Merge branch 'spar_mt_prompt_invar' of github.com:EleutherAI/elk into…
ChristyKoh Apr 19, 2023
5f0f32a
fix ds_name bug
ChristyKoh Apr 20, 2023
8fa07b4
Update README.md
lauritowal Apr 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add ag_news template, translated to pt
  • Loading branch information
ChristyKoh committed Apr 5, 2023
commit 0ff1609b4d7fd7dbd50b825e1e3039eeeaec1465
2 changes: 1 addition & 1 deletion elk/promptsource/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# These are users whose datasets should be included in the results returned by
# filter_english_datasets (regardless of their metadata)
INCLUDED_USERS = {"Zaid", "craffel", "lauritowal"}
INCLUDED_USERS = {"Zaid", "craffel", "lauritowal", "christykoh"}


def highlight(input):
Expand Down
215 changes: 215 additions & 0 deletions elk/promptsource/templates/christykoh/ag_news_pt/templates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
dataset: ag_news_pt
templates:
24e44a81-a18a-42dd-a71c-5b31b2d2cb39: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: 24e44a81-a18a-42dd-a71c-5b31b2d2cb39
jinja: "Qual rótulo melhor descreve este artigo de notícias?\n{{text}} ||| \n{{answer_choices[label]\
\ }}"
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- pt
metrics:
- Accuracy
original_task: true
name: classify_question_first
reference: ''
8fdc1056-1029-41a1-9c67-354fc2b8ceaf: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: 8fdc1056-1029-41a1-9c67-354fc2b8ceaf
jinja: "Isso é uma notícia sobre {{\"política mundial, esportes, negócios,\
\ ou ciência e tecnologia\"}}?\n{{text}} \n||| \n{{answer_choices[label] }}"
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics:
- Accuracy
original_task: true
name: classify_with_choices_question_first
reference: ''
918267e0-af68-4117-892d-2dbe66a58ce9: !Template
answer_choices: Político ||| Atleta ||| Executivo de negócios ||| Cientista
id: 918267e0-af68-4117-892d-2dbe66a58ce9
jinja: 'Você recomendaria o seguinte artigo para um {{"político"}}, um {{"atleta"}},
um {{"executivo de negócios"}} ou um {{"cientista"}}?


{{ text }}

|||

{{answer_choices[label]}}'
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics:
- Accuracy
original_task: true
name: recommend
reference: ''
9345df33-4f23-4944-a33c-eef94e626862: !Template
answer_choices: Notícias do mundo ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: 9345df33-4f23-4944-a33c-eef94e626862
jinja: "{{text}} \n\nQual das seguintes seções de um jornal seria esta\
\ artigo provavelmente aparece em? {{\"Notícias do mundo\"}}, {{\"Esportes\"}}, {{\"Negócios\"\
}} ou {{\"Ciência e Tecnologia\"}}? ||| \n{{answer_choices[label] }}"
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics:
- Accuracy
original_task: true
name: which_section_choices
reference: ''
98534347-fff7-4c39-a795-4e69a44791f7: !Template
answer_choices: Notícias do mundo ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: 98534347-fff7-4c39-a795-4e69a44791f7
jinja: "{{text}} \n\nEm qual seção de um jornal este artigo provavelmente apareceria\
\ em? ||| \n{{answer_choices[label] }}"
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- pt
metrics:
- Accuracy
original_task: true
name: which_section
reference: ''
b1d49782-dfd9-41a5-87a6-8fceab9c2198: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: b1d49782-dfd9-41a5-87a6-8fceab9c2198
jinja: 'Considere o seguinte exemplo: '''''' {{text}} ''''''
Opção 1: {{answer_choices[label]}}.
Opção 2: {{answer_choices[1 - label]}}. Entre a opção 1 e a opção 2, o tópico deste exemplo é ||| {{answer_choices[label]}}'
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics: []
original_task: true
name: burns_1
reference: Burns et al
b2d49782-dfd9-41a5-87a6-8fceab9c2198: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: b2d49782-dfd9-41a5-87a6-8fceab9c2198
jinja: 'Consider the following example: '''''' {{text}} ''''''
Opção 1: {{answer_choices[label]}}.
Opção 2: {{answer_choices[1 - label]}}. Entre a opção 1 e a opção 2, qual é o tópico deste exemplo? ||| {{answer_choices[label]}}'
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics: []
original_task: true
name: burns_2
reference: Burns et al
b3d49782-dfd9-41a5-87a6-8fceab9c2198: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: b3d49782-dfd9-41a5-87a6-8fceab9c2198
jinja: 'Considere o seguinte exemplo: '''''' {{text}} ''''''
Qual é o tópico deste exemplo, opção 1: {{answer_choices[label]}},
ou opção 2: {{answer_choices[1 - label]}}? ||| {{answer_choices[label]}}'
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics: []
original_task: true
name: burns_3
reference: Burns et al
b4d49782-dfd9-41a5-87a6-8fceab9c2198: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: b4d49782-dfd9-41a5-87a6-8fceab9c2198
jinja: '{{text}}
Opção 1: {{answer_choices[label]}}. Opção 2: {{answer_choices[1 - label]}}. Entre a opção 1 e a opção 2, o tópico deste exemplo é ||| {{answer_choices[label]}}'
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics: []
original_task: true
name: burns_4
reference: Burns et al
b5d49782-dfd9-41a5-87a6-8fceab9c2198: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: b5d49782-dfd9-41a5-87a6-8fceab9c2198
jinja: '{{text}}
Opção 1: {{answer_choices[label]}}. Opção 2: {{answer_choices[1 - label]}}. Entre a opção 1 e a opção 2, qual é o tema deste exemplo? ||| {{answer_choices[label]}}'
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics: []
original_task: true
name: burns_5
reference: Burns et al
b6d49782-dfd9-41a5-87a6-8fceab9c2198: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: b6d49782-dfd9-41a5-87a6-8fceab9c2198
jinja: '{{text}}
Qual é o tópico deste exemplo, escolha 1: {{answer_choices[label]}}, ou escolha 2: {{answer_choices[1 - label]}}? ||| {{answer_choices[label]}}'
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics: []
original_task: true
name: burns_6
reference: Burns et al
b7d49782-dfd9-41a5-87a6-8fceab9c2198: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: b7d49782-dfd9-41a5-87a6-8fceab9c2198
jinja: '{{text}}
Qual rótulo melhor descreve este artigo de notícias, escolha 1: {{answer_choices[label]}}, ou escolha 2: {{answer_choices[1 - label]}}? ||| {{answer_choices[label]}}'
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics: []
original_task: true
name: burns_7
reference: Burns et al
b8d49782-dfd9-41a5-87a6-8fceab9c2198: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: b8d49782-dfd9-41a5-87a6-8fceab9c2198
jinja: '{{text}}
Em qual seção de um jornal esse artigo provavelmente apareceria, escolha 1: {{answer_choices[label]}}, ou escolha 2: {{answer_choices[1 - label]}}? ||| {{answer_choices[label]}}'
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics: []
original_task: true
name: burns_8
reference: Burns et al
b401b0ee-6ffe-4a91-8e15-77ee073cd858: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: b401b0ee-6ffe-4a91-8e15-77ee073cd858
jinja: "{{text}} \nIsto é uma notícia sobre {{\"política mundial, esportes,\
\ negócios ou ciência e tecnologia\"}}? ||| \n{{answer_choices[label] }}"
metadata: !TemplateMetadata
choices_in_prompt: true
languages:
- pt
metrics:
- Accuracy
original_task: true
name: classify_with_choices
reference: ''
cb355f33-7e8c-4455-a72b-48d315bd4f60: !Template
answer_choices: Política mundial ||| Esportes ||| Negócios ||| Ciência e Tecnologia
id: cb355f33-7e8c-4455-a72b-48d315bd4f60
jinja: "{{text}} \nQual rótulo melhor descreve esta notícia? ||| \n{{answer_choices[label]\
\ }}"
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- pt
metrics:
- Accuracy
original_task: true
name: classify
reference: ''