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
5ed56f7c
"examples/vscode:/vscode.git/clone" did not exist on "4a1fa2c411504af3330da1fa0a28c764dab774ed"
Commit
5ed56f7c
authored
Dec 02, 2024
by
Baber
Browse files
nit
parent
3bc7baaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lm_eval/api/instance.py
lm_eval/api/instance.py
+5
-1
No files found.
lm_eval/api/instance.py
View file @
5ed56f7c
from
dataclasses
import
dataclass
,
field
from
dataclasses
import
dataclass
,
field
from
typing
import
Literal
,
Optional
,
Tuple
from
typing
import
Literal
,
Optional
,
Tuple
from
lm_eval.api.types
import
GenerateUntilRequest
,
LogLiklehoodRequest
OutputType
=
Literal
[
OutputType
=
Literal
[
"loglikelihood"
,
"loglikelihood_rolling"
,
"generate_until"
,
"multiple_choice"
"loglikelihood"
,
"loglikelihood_rolling"
,
"generate_until"
,
"multiple_choice"
...
@@ -34,5 +36,7 @@ class Instance:
...
@@ -34,5 +36,7 @@ class Instance:
Returns (string,) where `string` is the string to calculate loglikelihood over
Returns (string,) where `string` is the string to calculate loglikelihood over
"""
"""
return
(
return
(
self
.
arguments
if
isinstance
(
self
.
arguments
,
tuple
)
else
(
self
.
arguments
,)
GenerateUntilRequest
(
*
self
.
arguments
)
if
self
.
request_type
!=
"generate_until"
else
LogLiklehoodRequest
(
*
self
.
arguments
)
)
)
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