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
400c0199
"vscode:/vscode.git/clone" did not exist on "f6528b74be50e1b82bd06e895e9a382669438661"
Commit
400c0199
authored
Jun 15, 2023
by
lintangsutawika
Browse files
minor fixes to satisify pre-commit
parent
2ee7121b
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
main.py
main.py
+2
-1
scripts/write_out.py
scripts/write_out.py
+9
-9
No files found.
main.py
View file @
400c0199
...
@@ -10,6 +10,7 @@ from lm_eval.logger import eval_logger
...
@@ -10,6 +10,7 @@ from lm_eval.logger import eval_logger
os
.
environ
[
"TOKENIZERS_PARALLELISM"
]
=
"false"
os
.
environ
[
"TOKENIZERS_PARALLELISM"
]
=
"false"
ALL_TASKS
=
sorted
(
list
(
TASK_REGISTRY
.
keys
())
+
list
(
GROUP_REGISTRY
.
keys
()))
ALL_TASKS
=
sorted
(
list
(
TASK_REGISTRY
.
keys
())
+
list
(
GROUP_REGISTRY
.
keys
()))
class
MultiChoice
:
class
MultiChoice
:
def
__init__
(
self
,
choices
):
def
__init__
(
self
,
choices
):
self
.
choices
=
choices
self
.
choices
=
choices
...
...
scripts/write_out.py
View file @
400c0199
...
@@ -32,10 +32,10 @@ def main():
...
@@ -32,10 +32,10 @@ def main():
task_names
=
args
.
tasks
.
split
(
","
)
task_names
=
args
.
tasks
.
split
(
","
)
task_dict
=
tasks
.
get_task_dict
(
task_names
)
task_dict
=
tasks
.
get_task_dict
(
task_names
)
description_dict
=
{}
#
description_dict = {}
if
args
.
description_dict_path
:
#
if args.description_dict_path:
with
open
(
args
.
description_dict_path
,
"r"
)
as
f
:
#
with open(args.description_dict_path, "r") as f:
description_dict
=
json
.
load
(
f
)
#
description_dict = json.load(f)
os
.
makedirs
(
args
.
output_base_path
,
exist_ok
=
True
)
os
.
makedirs
(
args
.
output_base_path
,
exist_ok
=
True
)
for
task_name
,
task
in
task_dict
.
items
():
for
task_name
,
task
in
task_dict
.
items
():
...
@@ -55,11 +55,11 @@ def main():
...
@@ -55,11 +55,11 @@ def main():
docs
=
join_iters
(
iters
)
docs
=
join_iters
(
iters
)
description
=
(
#
description = (
description_dict
[
task_name
]
#
description_dict[task_name]
if
description_dict
and
task_name
in
description_dict
#
if description_dict and task_name in description_dict
else
""
#
else ""
)
#
)
with
open
(
os
.
path
.
join
(
args
.
output_base_path
,
task_name
),
"w"
)
as
f
:
with
open
(
os
.
path
.
join
(
args
.
output_base_path
,
task_name
),
"w"
)
as
f
:
for
i
,
doc
in
(
for
i
,
doc
in
(
...
...
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