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
7684bfa9
Commit
7684bfa9
authored
Jul 14, 2023
by
haileyschoelkopf
Browse files
fix typehints in Instance()
parent
04c81e7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
lm_eval/api/instance.py
lm_eval/api/instance.py
+7
-7
No files found.
lm_eval/api/instance.py
View file @
7684bfa9
...
@@ -4,13 +4,13 @@ from typing import Literal, Tuple
...
@@ -4,13 +4,13 @@ from typing import Literal, Tuple
@
dataclass
@
dataclass
class
Instance
:
class
Instance
:
request_type
:
str
=
Literal
[
request_type
:
Literal
[
"loglikelihood"
,
"loglikelihood_rolling"
,
"greedy_until"
]
"loglikelihood"
,
"loglikelihood_rolling"
,
"greedy_until"
doc
:
dict
]
arguments
:
tuple
doc
:
dict
=
None
idx
:
int
arguments
:
t
uple
=
None
metadata
:
T
uple
[
str
,
int
,
int
]
=
field
(
idx
:
int
=
None
default_factory
=
lambda
:
(
None
,
None
,
None
)
metadata
:
tuple
=
Tuple
[
str
,
int
,
int
]
# TODO: better typehints here
)
# TODO: better typehints here
resps
:
list
=
field
(
default_factory
=
list
)
resps
:
list
=
field
(
default_factory
=
list
)
filtered_resps
:
dict
=
field
(
default_factory
=
dict
)
filtered_resps
:
dict
=
field
(
default_factory
=
dict
)
...
...
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