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
d96b991d
Commit
d96b991d
authored
Mar 28, 2021
by
Jonathan Tow
Browse files
Add `Random` argument to `write_out` `fewshot_context`
parent
7ff58fe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
scripts/write_out.py
scripts/write_out.py
+3
-1
No files found.
scripts/write_out.py
View file @
d96b991d
...
...
@@ -22,8 +22,9 @@ def parse_args():
def
main
():
args
=
parse_args
()
random
.
seed
(
args
.
seed
)
np
.
random
.
seed
(
args
.
seed
)
rnd
=
random
.
Random
()
rnd
.
seed
(
args
.
seed
)
if
args
.
tasks
==
"all_tasks"
:
task_names
=
tasks
.
ALL_TASKS
...
...
@@ -53,6 +54,7 @@ def main():
doc
=
doc
,
provide_description
=
args
.
provide_description
,
num_fewshot
=
args
.
num_fewshot
,
rnd
=
rnd
)
f
.
write
(
ctx
+
"
\n
"
)
...
...
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