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
80a739eb
Commit
80a739eb
authored
May 05, 2021
by
Leo Gao
Browse files
Fix some things for tests
parent
f16c301e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
lm_eval/base.py
lm_eval/base.py
+1
-1
lm_eval/tasks/pile.py
lm_eval/tasks/pile.py
+1
-0
tests/test_evaluator.py
tests/test_evaluator.py
+1
-1
No files found.
lm_eval/base.py
View file @
80a739eb
...
...
@@ -351,7 +351,7 @@ class PerplexityTask(Task, abc.ABC):
req_ret_lens
=
{
'loglikelihood'
:
2
,
'greedy_until'
:
None
,
'loglikelihood_perplexity'
:
1
,
'loglikelihood_perplexity'
:
None
,
}
import
os
...
...
lm_eval/tasks/pile.py
View file @
80a739eb
...
...
@@ -16,6 +16,7 @@ class PilePerplexityTask(PerplexityTask, abc.ABC):
TEST_PATH
=
'data/pile/test.jsonl.zst'
def
download
(
self
):
# TODO: separate pile val/test out by component so we don't have to scan the entire file once per set
os
.
makedirs
(
"data/pile/"
,
exist_ok
=
True
)
if
not
os
.
path
.
exists
(
self
.
VAL_PATH
):
download_file
(
"https://the-eye.eu/public/AI/pile/val.jsonl.zst"
,
self
.
VAL_PATH
)
...
...
tests/test_evaluator.py
View file @
80a739eb
...
...
@@ -35,7 +35,7 @@ def test_evaluator(taskname, Task):
res
=
[]
random
.
seed
(
42
)
for
_
in
reqs
:
res
.
append
(
(
-
random
.
random
()
,)
)
res
.
append
(
-
random
.
random
())
return
res
...
...
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