"vscode:/vscode.git/clone" did not exist on "dc746d85f089445e1f9c3a3ea6592cd590b7deb9"
Unverified Commit c445e56b authored by Leo Gao's avatar Leo Gao Committed by GitHub
Browse files

Merge pull request #167 from jon-tow/write-out-random-fix

Add `Random` argument to `write_out` `fewshot_context`
parents 7ff58fe1 d96b991d
...@@ -22,8 +22,9 @@ def parse_args(): ...@@ -22,8 +22,9 @@ def parse_args():
def main(): def main():
args = parse_args() args = parse_args()
random.seed(args.seed)
np.random.seed(args.seed) np.random.seed(args.seed)
rnd = random.Random()
rnd.seed(args.seed)
if args.tasks == "all_tasks": if args.tasks == "all_tasks":
task_names = tasks.ALL_TASKS task_names = tasks.ALL_TASKS
...@@ -53,6 +54,7 @@ def main(): ...@@ -53,6 +54,7 @@ def main():
doc=doc, doc=doc,
provide_description=args.provide_description, provide_description=args.provide_description,
num_fewshot=args.num_fewshot, num_fewshot=args.num_fewshot,
rnd=rnd
) )
f.write(ctx + "\n") f.write(ctx + "\n")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment