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
ebe7226e
Unverified
Commit
ebe7226e
authored
Aug 26, 2024
by
Baber Abbasi
Committed by
GitHub
Aug 25, 2024
Browse files
chat template hotfix (#2250)
* chat template hotfix * pre-commit
parent
aab42ba8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
lm_eval/evaluator.py
lm_eval/evaluator.py
+7
-1
No files found.
lm_eval/evaluator.py
View file @
ebe7226e
...
@@ -287,12 +287,18 @@ def simple_evaluate(
...
@@ -287,12 +287,18 @@ def simple_evaluate(
if
check_integrity
:
if
check_integrity
:
run_task_tests
(
task_list
=
tasks
)
run_task_tests
(
task_list
=
tasks
)
# hotfix: delete when chat_template fixed
try
:
chat
=
lm
.
chat_template
(
apply_chat_template
)
except
:
# noqa: E722
chat
=
None
if
evaluation_tracker
is
not
None
:
if
evaluation_tracker
is
not
None
:
evaluation_tracker
.
general_config_tracker
.
log_experiment_args
(
evaluation_tracker
.
general_config_tracker
.
log_experiment_args
(
model_source
=
model
,
model_source
=
model
,
model_args
=
model_args
,
model_args
=
model_args
,
system_instruction
=
system_instruction
,
system_instruction
=
system_instruction
,
chat_template
=
lm
.
chat
_template
(
apply_chat_template
)
,
chat_template
=
chat
,
fewshot_as_multiturn
=
fewshot_as_multiturn
,
fewshot_as_multiturn
=
fewshot_as_multiturn
,
)
)
...
...
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