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
37ccb191
Commit
37ccb191
authored
Nov 28, 2023
by
lintangsutawika
Browse files
force configs with num_fewshot=0 to ignore manual num_fewshot setting
parent
61d0f137
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lm_eval/evaluator.py
lm_eval/evaluator.py
+6
-2
No files found.
lm_eval/evaluator.py
View file @
37ccb191
...
@@ -119,13 +119,17 @@ def simple_evaluate(
...
@@ -119,13 +119,17 @@ def simple_evaluate(
config
=
task_obj
.
_config
config
=
task_obj
.
_config
if
num_fewshot
is
not
None
:
if
num_fewshot
is
not
None
:
if
config
[
"num_fewshot"
]
>
0
:
if
config
[
"num_fewshot"
]
==
0
:
eval_logger
.
info
(
f
"num_fewshot has been set to 0 for
{
task_name
}
in its config. Manual configuration will be ignored."
)
elif
config
[
"num_fewshot"
]
>
0
:
default_num_fewshot
=
config
[
"num_fewshot"
]
default_num_fewshot
=
config
[
"num_fewshot"
]
eval_logger
.
warning
(
eval_logger
.
warning
(
f
"Overwriting default num_fewshot of
{
task_name
}
from
{
default_num_fewshot
}
to
{
num_fewshot
}
"
f
"Overwriting default num_fewshot of
{
task_name
}
from
{
default_num_fewshot
}
to
{
num_fewshot
}
"
)
)
task_obj
.
_config
[
"num_fewshot"
]
=
num_fewshot
task_obj
.
_config
[
"num_fewshot"
]
=
num_fewshot
if
check_integrity
:
if
check_integrity
:
run_task_tests
(
task_list
=
tasks
)
run_task_tests
(
task_list
=
tasks
)
...
...
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