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
d895bfe6
Commit
d895bfe6
authored
Feb 12, 2022
by
Stephen Hogg
Browse files
Update dummy model classmethod args
parent
05590e11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
lm_eval/models/dummy.py
lm_eval/models/dummy.py
+7
-7
No files found.
lm_eval/models/dummy.py
View file @
d895bfe6
...
...
@@ -7,30 +7,30 @@ class DummyLM(LM):
pass
@
classmethod
def
create_from_arg_string
(
cls
,
arg_string
):
def
create_from_arg_string
(
cls
,
arg_string
,
additional_config
=
None
):
return
cls
()
def
loglikelihood
(
self
,
requests
):
res
=
[]
for
_
in
requests
:
res
.
append
((
-
random
.
random
(),
False
))
return
res
def
greedy_until
(
self
,
requests
):
res
=
[]
for
ctx
,
_
in
requests
:
res
.
append
(
"lol"
)
assert
ctx
.
strip
()
!=
''
assert
ctx
.
strip
()
!=
""
return
res
def
loglikelihood_rolling
(
self
,
requests
):
res
=
[]
for
_
in
requests
:
res
.
append
(
-
random
.
random
())
return
res
\ No newline at end of file
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