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
439dca55
Commit
439dca55
authored
Dec 29, 2023
by
lintangsutawika
Browse files
list tuple for string based multigpu collection
parent
99ce4eff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lm_eval/evaluator.py
lm_eval/evaluator.py
+1
-1
No files found.
lm_eval/evaluator.py
View file @
439dca55
...
@@ -401,7 +401,7 @@ def evaluate(
...
@@ -401,7 +401,7 @@ def evaluate(
if
type
(
items
[
0
])
==
tuple
:
if
type
(
items
[
0
])
==
tuple
:
numitem
=
len
(
items
[
0
])
numitem
=
len
(
items
[
0
])
if
isinstance
(
items
[
0
],
(
str
,
list
)):
if
isinstance
(
items
[
0
],
(
str
,
list
,
tuple
)):
# handle the string case
# handle the string case
gathered_items
=
[
None
]
*
lm
.
accelerator
.
num_processes
gathered_items
=
[
None
]
*
lm
.
accelerator
.
num_processes
torch
.
distributed
.
all_gather_object
(
gathered_items
,
items
)
torch
.
distributed
.
all_gather_object
(
gathered_items
,
items
)
...
...
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