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
38e8858f
Commit
38e8858f
authored
Feb 03, 2021
by
Leo Gao
Browse files
Get rid of utils_stream
parent
88ec855d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
29 deletions
+13
-29
lm_eval/tasks/race.py
lm_eval/tasks/race.py
+13
-1
lm_eval/utils_stream.py
lm_eval/utils_stream.py
+0
-28
No files found.
lm_eval/tasks/race.py
View file @
38e8858f
...
...
@@ -3,7 +3,19 @@ import datasets
import
numpy
as
np
from
lm_eval.base
import
rf
,
mean
from
.
common
import
HFTask
from
..utils_stream
import
each
import
os
from
functools
import
reduce
import
operator
from
tqdm
import
tqdm
import
json
class
each
:
def
__init__
(
self
,
f
):
self
.
f
=
f
def
__rrshift__
(
self
,
other
):
return
list
(
map
(
self
.
f
,
other
))
class
RACE
(
HFTask
):
...
...
lm_eval/utils_stream.py
deleted
100644 → 0
View file @
88ec855d
import
os
from
functools
import
reduce
import
operator
from
tqdm
import
tqdm
import
json
# TODO: phase out utils_stream
class
each
:
def
__init__
(
self
,
f
):
self
.
f
=
f
def
__rrshift__
(
self
,
other
):
return
list
(
map
(
self
.
f
,
other
))
class
filt
:
def
__init__
(
self
,
f
):
self
.
f
=
f
def
__rrshift__
(
self
,
other
):
return
list
(
filter
(
self
.
f
,
other
))
class
apply
:
def
__init__
(
self
,
f
):
self
.
f
=
f
def
__rrshift__
(
self
,
other
):
return
self
.
f
(
other
)
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