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
3d4c4cd6
Commit
3d4c4cd6
authored
Sep 20, 2023
by
Herbie Bradley
Browse files
Add evaluator temp code for debug
parent
be95d945
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
23 deletions
+24
-23
lm_eval/evaluator.py
lm_eval/evaluator.py
+24
-23
No files found.
lm_eval/evaluator.py
View file @
3d4c4cd6
...
@@ -428,6 +428,7 @@ def evaluate(
...
@@ -428,6 +428,7 @@ def evaluate(
torch_device_tensor
=
lm
.
accelerator
.
pad_across_processes
(
torch_device_tensor
=
lm
.
accelerator
.
pad_across_processes
(
metrics_tensor
.
to
(
torch
.
float32
),
pad_index
=
pad_value
metrics_tensor
.
to
(
torch
.
float32
),
pad_index
=
pad_value
)
)
gathered_item
=
lm
.
accelerator
.
gather
(
torch_device_tensor
)
gathered_item
=
lm
.
accelerator
.
gather
(
torch_device_tensor
)
if
numitem
>
0
:
if
numitem
>
0
:
gathered_filtered
=
gathered_item
[
gathered_item
[:,
0
]
!=
pad_value
]
gathered_filtered
=
gathered_item
[
gathered_item
[:,
0
]
!=
pad_value
]
...
...
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