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
chenpangpang
transformers
Commits
1d189304
Commit
1d189304
authored
Dec 10, 2019
by
Julien Chaumond
Browse files
Harmonize `no_cuda` flag with other scripts
parent
f7eba090
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/summarization/run_summarization.py
examples/summarization/run_summarization.py
+2
-2
No files found.
examples/summarization/run_summarization.py
View file @
1d189304
...
...
@@ -272,7 +272,7 @@ def main():
)
# EVALUATION options
parser
.
add_argument
(
"--
t
o_c
p
u"
,
"--
n
o_cu
da
"
,
default
=
False
,
type
=
bool
,
help
=
"Whether to force the execution on CPU."
,
...
...
@@ -314,7 +314,7 @@ def main():
args
=
parser
.
parse_args
()
# Select device (distibuted not available)
args
.
device
=
torch
.
device
(
"cuda"
if
torch
.
cuda
.
is_available
()
and
not
args
.
t
o_c
p
u
else
"cpu"
)
args
.
device
=
torch
.
device
(
"cuda"
if
torch
.
cuda
.
is_available
()
and
not
args
.
n
o_cu
da
else
"cpu"
)
# Check the existence of directories
if
not
args
.
summaries_output_dir
:
...
...
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