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
66eed4bb
Commit
66eed4bb
authored
Nov 17, 2023
by
lintangsutawika
Browse files
update script to use initialize_tasks
parent
a58674ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
scripts/write_out.py
scripts/write_out.py
+10
-3
No files found.
scripts/write_out.py
View file @
66eed4bb
...
...
@@ -4,9 +4,8 @@ import json
import
os
import
random
from
lm_eval
import
tasks
from
lm_eval.utils
import
join_iters
from
lm_eval.tasks
import
include_path
from
lm_eval.logger
import
eval_logger
from
lm_eval.utils
import
join_iters
,
eval_logger
from
lm_eval.tasks
import
initialize_tasks
,
include_path
EXAMPLE_DIVIDER
=
"!!@@##@@!! -- Example {i}
\n
"
...
...
@@ -25,6 +24,12 @@ def parse_args():
default
=
None
,
help
=
"Additional path to include if there are external tasks to include."
,
)
parser
.
add_argument
(
"--verbosity"
,
type
=
str
,
default
=
"INFO"
,
help
=
"Log error when tasks are not registered."
,
)
return
parser
.
parse_args
()
...
...
@@ -32,6 +37,8 @@ def main():
args
=
parse_args
()
np
.
random
.
seed
(
args
.
seed
)
initialize_tasks
(
args
.
verbosity
)
if
args
.
include_path
is
not
None
:
eval_logger
.
info
(
f
"Including path:
{
args
.
include_path
}
"
)
include_path
(
args
.
include_path
)
...
...
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