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
484fa090
Commit
484fa090
authored
May 10, 2023
by
lintangsutawika
Browse files
simplify
parent
cf79b1c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
main.py
main.py
+2
-5
No files found.
main.py
View file @
484fa090
...
...
@@ -6,12 +6,10 @@ import yaml
import
os
from
lm_eval
import
evaluator
,
tasks
from
lm_eval.
api.
task
import
ConfigurableTask
,
TASK_REGISTRY
from
lm_eval.task
s
import
ALL_TASKS
logging
.
getLogger
(
"openai"
).
setLevel
(
logging
.
WARNING
)
os
.
environ
[
'TOKENIZERS_PARALLELISM'
]
=
'false'
ALL_TASKS
=
sorted
(
list
(
TASK_REGISTRY
))
class
MultiChoice
:
def
__init__
(
self
,
choices
):
...
...
@@ -73,8 +71,7 @@ def main():
if
args
.
config
:
task_names
=
[]
for
config_files
in
args
.
config
.
split
(
","
):
with
open
(
config_files
,
"r"
)
as
f
:
config
=
yaml
.
load
(
f
,
yaml
.
Loader
)
config
=
get_yaml_config
(
config_files
)
if
args
.
num_fewshot
!=
0
:
config
[
"num_fewshot"
]
=
args
.
num_fewshot
...
...
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