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
56b7021f
Unverified
Commit
56b7021f
authored
Oct 24, 2023
by
Hailey Schoelkopf
Committed by
GitHub
Oct 24, 2023
Browse files
Merge pull request #937 from EleutherAI/big-refactor_write_out
Big refactor write out adaption
parents
408115ea
1a183d03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
scripts/write_out.py
scripts/write_out.py
+12
-0
No files found.
scripts/write_out.py
View file @
56b7021f
...
@@ -5,6 +5,8 @@ import os
...
@@ -5,6 +5,8 @@ import os
import
random
import
random
from
lm_eval
import
tasks
from
lm_eval
import
tasks
from
lm_eval.utils
import
join_iters
from
lm_eval.utils
import
join_iters
from
lm_eval.tasks
import
include_path
from
lm_eval.logger
import
eval_logger
EXAMPLE_DIVIDER
=
"!!@@##@@!! -- Example {i}
\n
"
EXAMPLE_DIVIDER
=
"!!@@##@@!! -- Example {i}
\n
"
...
@@ -17,6 +19,12 @@ def parse_args():
...
@@ -17,6 +19,12 @@ def parse_args():
parser
.
add_argument
(
"--num_fewshot"
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
"--num_fewshot"
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
"--seed"
,
type
=
int
,
default
=
42
)
parser
.
add_argument
(
"--seed"
,
type
=
int
,
default
=
42
)
parser
.
add_argument
(
"--num_examples"
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
"--num_examples"
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
"--include_path"
,
type
=
str
,
default
=
None
,
help
=
"Additional path to include if there are external tasks to include."
,
)
return
parser
.
parse_args
()
return
parser
.
parse_args
()
...
@@ -24,6 +32,10 @@ def main():
...
@@ -24,6 +32,10 @@ def main():
args
=
parse_args
()
args
=
parse_args
()
np
.
random
.
seed
(
args
.
seed
)
np
.
random
.
seed
(
args
.
seed
)
if
args
.
include_path
is
not
None
:
eval_logger
.
info
(
f
"Including path:
{
args
.
include_path
}
"
)
include_path
(
args
.
include_path
)
if
args
.
tasks
==
"all_tasks"
:
if
args
.
tasks
==
"all_tasks"
:
task_names
=
tasks
.
ALL_TASKS
task_names
=
tasks
.
ALL_TASKS
else
:
else
:
...
...
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