Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
a72453bb
Commit
a72453bb
authored
May 20, 2024
by
Israel Abebe Azime
Browse files
adding trasnslate direct
parent
241c5dc2
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
lm_eval/tasks/afrimgsm/utils.py
lm_eval/tasks/afrimgsm/utils.py
+7
-1
No files found.
lm_eval/tasks/afrimgsm/utils.py
View file @
a72453bb
...
...
@@ -119,6 +119,12 @@ def gen_lang_yamls(output_dir: str, overwrite: bool, mode: str) -> None:
REGEX
=
LANGUAGES
[
"eng"
][
"REGEX"
]
QUESTION
=
LANGUAGES
[
"eng"
][
"QUESTION"
]
task_name
=
f
"afrimgsm_en_cot_
{
lang
}
"
elif
mode
==
"translate-direct"
:
ANSWER
=
LANGUAGES
[
'eng'
][
"DIRECT"
]
QUESTION
=
LANGUAGES
[
'eng'
][
"QUESTION"
]
REGEX
=
None
task_name
=
f
"translate_afrimgsm_direct_
{
lang
}
"
yaml_template
=
"translate_direct_yaml"
file_name
=
f
"
{
task_name
}
.yaml"
...
...
@@ -178,7 +184,7 @@ def main() -> None:
parser
.
add_argument
(
"--mode"
,
default
=
"native-cot"
,
choices
=
[
"direct"
,
"direct-native"
,
"native-cot"
,
"en-cot"
],
choices
=
[
"direct"
,
"direct-native"
,
"native-cot"
,
"en-cot"
,
"translate-direct"
],
help
=
"Mode of chain-of-thought"
,
)
args
=
parser
.
parse_args
()
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment