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
6139a5de
Commit
6139a5de
authored
May 19, 2025
by
Baber
Browse files
add typehint
parent
3285f030
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/api/instance.py
lm_eval/api/instance.py
+2
-2
No files found.
lm_eval/api/instance.py
View file @
6139a5de
from
dataclasses
import
dataclass
,
field
from
typing
import
Generic
,
Literal
,
Optional
,
Tuple
,
TypeVar
from
typing
import
Generic
,
Literal
,
Optional
,
Tuple
,
TypeVar
,
Union
from
lm_eval.api.types
import
GenerateInput
,
LoglikelihoodInput
...
...
@@ -20,7 +20,7 @@ class Instance(Generic[T]):
metadata
:
Tuple
[
Optional
[
str
],
Optional
[
int
],
Optional
[
int
]]
=
field
(
default_factory
=
lambda
:
(
None
,
None
,
None
)
)
resps
:
list
=
field
(
default_factory
=
list
)
resps
:
list
[
Union
[
GenerateInput
,
LoglikelihoodInput
]]
=
field
(
default_factory
=
list
)
filtered_resps
:
dict
=
field
(
default_factory
=
dict
)
# initialized after init
...
...
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