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
3f5d4beb
Unverified
Commit
3f5d4beb
authored
Nov 23, 2020
by
Stella Biderman
Committed by
GitHub
Nov 23, 2020
Browse files
Added truncation flag
This should allow the user to only do the first few eval tasks.
parent
8d7d2132
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
main.py
main.py
+2
-1
No files found.
main.py
View file @
3f5d4beb
...
...
@@ -15,6 +15,7 @@ def parse_args():
parser
.
add_argument
(
'--num_fewshot'
,
type
=
int
,
default
=
1
)
parser
.
add_argument
(
'--seed'
,
type
=
int
,
default
=
1234
)
parser
.
add_argument
(
'--output_path'
,
default
=
None
)
parser
.
add_argument
(
'--truncate'
,
default
=
None
)
return
parser
.
parse_args
()
...
...
@@ -34,7 +35,7 @@ def main():
if
not
task
.
has_validation_docs
():
continue
result
=
task
.
evaluate
(
docs
=
task
.
validation_docs
(),
docs
=
itertools
.
isslice
(
task
.
validation_docs
(),
stop
=
args
.
truncate
),
lm
=
lm
,
provide_description
=
args
.
provide_description
,
num_fewshot
=
args
.
num_fewshot
,
...
...
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