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
af7351ef
"examples/vscode:/vscode.git/clone" did not exist on "0e49e6591a865843035b65dff4fc819e097ab492"
Commit
af7351ef
authored
Jan 23, 2024
by
lintangsutawika
Browse files
remove args
parent
b7075cb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
lm_eval/evaluator.py
lm_eval/evaluator.py
+1
-6
No files found.
lm_eval/evaluator.py
View file @
af7351ef
...
@@ -38,7 +38,6 @@ def simple_evaluate(
...
@@ -38,7 +38,6 @@ def simple_evaluate(
write_out
:
bool
=
False
,
write_out
:
bool
=
False
,
log_samples
:
bool
=
True
,
log_samples
:
bool
=
True
,
gen_kwargs
:
str
=
None
,
gen_kwargs
:
str
=
None
,
weight_by_size
:
bool
=
False
,
):
):
"""Instantiate and evaluate a model on a list of tasks.
"""Instantiate and evaluate a model on a list of tasks.
...
@@ -124,7 +123,7 @@ def simple_evaluate(
...
@@ -124,7 +123,7 @@ def simple_evaluate(
for
task_name
in
task_dict
.
keys
():
for
task_name
in
task_dict
.
keys
():
task_obj
=
task_dict
[
task_name
]
task_obj
=
task_dict
[
task_name
]
if
type
(
task_obj
)
==
tuple
:
if
type
(
task_obj
)
==
tuple
:
group
,
task_obj
=
task_obj
_
,
task_obj
=
task_obj
if
task_obj
is
None
:
if
task_obj
is
None
:
continue
continue
...
@@ -156,7 +155,6 @@ def simple_evaluate(
...
@@ -156,7 +155,6 @@ def simple_evaluate(
decontamination_ngrams_path
=
decontamination_ngrams_path
,
decontamination_ngrams_path
=
decontamination_ngrams_path
,
write_out
=
write_out
,
write_out
=
write_out
,
log_samples
=
log_samples
,
log_samples
=
log_samples
,
weight_by_size
=
weight_by_size
,
)
)
if
lm
.
rank
==
0
:
if
lm
.
rank
==
0
:
...
@@ -482,9 +480,6 @@ def evaluate(
...
@@ -482,9 +480,6 @@ def evaluate(
if
"alias"
in
metrics
:
if
"alias"
in
metrics
:
metrics
.
pop
(
"alias"
)
metrics
.
pop
(
"alias"
)
# TODO: There should be a way for users
# to toggle between weighted and
# unweighted averaging
if
weight_by_size
:
if
weight_by_size
:
current_size
=
metrics
.
pop
(
"samples"
)
current_size
=
metrics
.
pop
(
"samples"
)
else
:
else
:
...
...
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