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
87a59d41
Commit
87a59d41
authored
Jul 21, 2025
by
Baber
Browse files
add type hints
parent
d83f7eb0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lm_eval/api/metrics.py
lm_eval/api/metrics.py
+4
-4
No files found.
lm_eval/api/metrics.py
View file @
87a59d41
...
@@ -6,8 +6,8 @@ import os
...
@@ -6,8 +6,8 @@ import os
import
random
import
random
import
re
import
re
import
string
import
string
from
collections.abc
import
Iterable
,
Sequence
from
collections.abc
import
Callable
,
Iterable
,
Sequence
from
typing
import
Callable
,
Generic
,
TypeVar
from
typing
import
Generic
,
TypeVar
import
numpy
as
np
import
numpy
as
np
...
@@ -207,8 +207,8 @@ def acc_mutual_info_fn(items): # This is a passthrough function
...
@@ -207,8 +207,8 @@ def acc_mutual_info_fn(items): # This is a passthrough function
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
def
exact_match_hf_evaluate
(
def
exact_match_hf_evaluate
(
predictions
,
predictions
:
Iterable
[
str
]
,
references
,
references
:
Iterable
[
str
]
,
regexes_to_ignore
=
None
,
regexes_to_ignore
=
None
,
ignore_case
=
False
,
ignore_case
=
False
,
ignore_punctuation
=
False
,
ignore_punctuation
=
False
,
...
...
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