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
4b0c49a1
"...resnet50_tensorflow.git" did not exist on "3d9ae6de147325e139c7d1ef452b3389fddc9a53"
Commit
4b0c49a1
authored
May 31, 2024
by
Konrad
Browse files
linting backward compatibility fix
parent
6f76522a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
lm_eval/api/model.py
lm_eval/api/model.py
+2
-2
lm_eval/api/task.py
lm_eval/api/task.py
+1
-1
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+2
-2
No files found.
lm_eval/api/model.py
View file @
4b0c49a1
...
@@ -3,7 +3,7 @@ import hashlib
...
@@ -3,7 +3,7 @@ import hashlib
import
json
import
json
import
logging
import
logging
import
os
import
os
from
typing
import
List
,
Optional
,
Tuple
,
Type
,
TypeVar
from
typing
import
Dict
,
List
,
Optional
,
Tuple
,
Type
,
TypeVar
import
transformers
import
transformers
from
sqlitedict
import
SqliteDict
from
sqlitedict
import
SqliteDict
...
@@ -114,7 +114,7 @@ class LM(abc.ABC):
...
@@ -114,7 +114,7 @@ class LM(abc.ABC):
"""
"""
pass
pass
def
apply_chat_template
(
self
,
chat_history
:
l
ist
[
d
ict
[
str
,
str
]])
->
str
:
def
apply_chat_template
(
self
,
chat_history
:
L
ist
[
D
ict
[
str
,
str
]])
->
str
:
"""
"""
Defines how to transform few-shot examples provided as chat history into a format that can be used as input to the LM.
Defines how to transform few-shot examples provided as chat history into a format that can be used as input to the LM.
...
...
lm_eval/api/task.py
View file @
4b0c49a1
...
@@ -975,7 +975,7 @@ class ConfigurableTask(Task):
...
@@ -975,7 +975,7 @@ class ConfigurableTask(Task):
@
staticmethod
@
staticmethod
def
append_target_question
(
def
append_target_question
(
labeled_examples
:
l
ist
[
d
ict
[
str
,
str
]],
labeled_examples
:
L
ist
[
D
ict
[
str
,
str
]],
question
:
str
,
question
:
str
,
fewshot_as_multiturn
:
bool
=
False
,
fewshot_as_multiturn
:
bool
=
False
,
)
->
None
:
)
->
None
:
...
...
lm_eval/models/huggingface.py
View file @
4b0c49a1
...
@@ -2,7 +2,7 @@ import copy
...
@@ -2,7 +2,7 @@ import copy
import
os
import
os
from
datetime
import
timedelta
from
datetime
import
timedelta
from
pathlib
import
Path
from
pathlib
import
Path
from
typing
import
List
,
Literal
,
Optional
,
Tuple
,
Union
from
typing
import
Dict
,
List
,
Literal
,
Optional
,
Tuple
,
Union
import
torch
import
torch
import
torch.nn.functional
as
F
import
torch.nn.functional
as
F
...
@@ -1290,7 +1290,7 @@ class HFLM(TemplateLM):
...
@@ -1290,7 +1290,7 @@ class HFLM(TemplateLM):
return
res
return
res
def
apply_chat_template
(
self
,
chat_history
:
l
ist
[
d
ict
[
str
,
str
]])
->
str
:
def
apply_chat_template
(
self
,
chat_history
:
L
ist
[
D
ict
[
str
,
str
]])
->
str
:
"""
"""
Method to apply a chat template to a list of chat history between user and model.
Method to apply a chat template to a list of chat history between user and model.
"""
"""
...
...
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