Unverified Commit 3f5d4beb authored by Stella Biderman's avatar Stella Biderman Committed by GitHub
Browse files

Added truncation flag

This should allow the user to only do the first few eval tasks.
parent 8d7d2132
...@@ -15,6 +15,7 @@ def parse_args(): ...@@ -15,6 +15,7 @@ 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=1234) parser.add_argument('--seed', type=int, default=1234)
parser.add_argument('--output_path', default=None) parser.add_argument('--output_path', default=None)
parser.add_argument('--truncate', default=None)
return parser.parse_args() return parser.parse_args()
...@@ -34,7 +35,7 @@ def main(): ...@@ -34,7 +35,7 @@ def main():
if not task.has_validation_docs(): if not task.has_validation_docs():
continue continue
result = task.evaluate( result = task.evaluate(
docs=task.validation_docs(), docs=itertools.isslice(task.validation_docs(), stop=args.truncate),
lm=lm, lm=lm,
provide_description=args.provide_description, provide_description=args.provide_description,
num_fewshot=args.num_fewshot, num_fewshot=args.num_fewshot,
......
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