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
5418acaf
Unverified
Commit
5418acaf
authored
Jul 18, 2023
by
Lintang Sutawika
Committed by
GitHub
Jul 18, 2023
Browse files
Merge pull request #685 from EleutherAI/add-comments
[Refactor] Minor changes
parents
b85ec188
7520ea80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
lm_eval/evaluator.py
lm_eval/evaluator.py
+12
-1
No files found.
lm_eval/evaluator.py
View file @
5418acaf
...
...
@@ -185,11 +185,22 @@ def evaluate(
# decontaminate = decontamination_ngrams_path is not None
# stores the final result for each task, for each metric/filter pair.
results
=
collections
.
defaultdict
(
dict
)
# Tracks each task's version.
versions
=
collections
.
defaultdict
(
dict
)
# Tracks the YAML configs of all chosen tasks.
configs
=
collections
.
defaultdict
(
dict
)
# logs info about each document evaluated.
samples
=
collections
.
defaultdict
(
list
)
# tracks all Instances/requests a model must generate output on.
requests
=
collections
.
defaultdict
(
list
)
# Stores task scores based on task grouping.
aggregate
=
collections
.
defaultdict
(
dict
)
# tracks if a task was chosen via user selecting a group containing it
task_groups
=
collections
.
defaultdict
(
dict
)
# stores the amount to pad out reqs per req. type so that
# number of fwd passes per distributed rank is equal
padding_requests
=
collections
.
defaultdict
(
int
)
# Stores group related keys and values for group-aggregation
...
...
@@ -201,8 +212,8 @@ def evaluate(
if
type
(
task
)
==
tuple
:
group
,
task
=
task
task_groups
[
task_name
]
=
group
task_groups
[
task_name
]
=
group
versions
[
task_name
]
=
task
.
VERSION
configs
[
task_name
]
=
dict
(
task
.
dump_config
())
...
...
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