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
4d3ea67a
Commit
4d3ea67a
authored
May 10, 2023
by
Benjamin Fattori
Browse files
fix warning issue if single device
parent
46f37ec0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lm_eval/models/gpt2.py
lm_eval/models/gpt2.py
+1
-1
main.py
main.py
+1
-1
No files found.
lm_eval/models/gpt2.py
View file @
4d3ea67a
...
@@ -71,7 +71,7 @@ class HFLM(LM):
...
@@ -71,7 +71,7 @@ class HFLM(LM):
# multigpu support with accelerate
# multigpu support with accelerate
if
gpus
>
1
:
if
gpus
>
1
:
accelerator
=
Accelerator
(
device_placement
=
False
)
accelerator
=
Accelerator
(
device_placement
=
False
)
if
gpus
>
self
.
accelerator
.
num_processes
:
if
gpus
>
accelerator
.
num_processes
:
warning
=
(
"WARNING: The number of total GPUs does not match the number of spawned processes. "
warning
=
(
"WARNING: The number of total GPUs does not match the number of spawned processes. "
"If you would like to use data parallelism, please launch the script "
"If you would like to use data parallelism, please launch the script "
"with 'accelerate launch *script*'. "
"with 'accelerate launch *script*'. "
...
...
main.py
View file @
4d3ea67a
...
@@ -57,7 +57,7 @@ def pattern_match(patterns, source_list):
...
@@ -57,7 +57,7 @@ def pattern_match(patterns, source_list):
for
pattern
in
patterns
:
for
pattern
in
patterns
:
for
matching
in
fnmatch
.
filter
(
source_list
,
pattern
):
for
matching
in
fnmatch
.
filter
(
source_list
,
pattern
):
task_names
.
add
(
matching
)
task_names
.
add
(
matching
)
return
list
(
task_names
)
return
sorted
(
list
(
task_names
)
)
def
main
():
def
main
():
...
...
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