Unverified Commit a1ef56aa authored by Leo Gao's avatar Leo Gao Committed by GitHub
Browse files

Allow num_examples to fetch all if num_examples < 0

parent 15c87e9b
...@@ -36,7 +36,7 @@ def main(): ...@@ -36,7 +36,7 @@ def main():
else: else:
docs = task.validation_docs() docs = task.validation_docs()
with open(os.path.join(args.output_base_path, task_name), "w") as f: with open(os.path.join(args.output_base_path, task_name), "w") as f:
for i, doc in zip(range(args.num_examples), docs): for i, doc in zip(range(args.num_examples), docs) if args.num_examples > 0 else enumerate(docs):
f.write(EXAMPLE_DIVIDER.format(i=i)) f.write(EXAMPLE_DIVIDER.format(i=i))
ctx = task.fewshot_context( ctx = task.fewshot_context(
doc=doc, doc=doc,
......
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