Commit 1d189304 authored by Julien Chaumond's avatar Julien Chaumond
Browse files

Harmonize `no_cuda` flag with other scripts

parent f7eba090
...@@ -272,7 +272,7 @@ def main(): ...@@ -272,7 +272,7 @@ def main():
) )
# EVALUATION options # EVALUATION options
parser.add_argument( parser.add_argument(
"--to_cpu", "--no_cuda",
default=False, default=False,
type=bool, type=bool,
help="Whether to force the execution on CPU.", help="Whether to force the execution on CPU.",
...@@ -314,7 +314,7 @@ def main(): ...@@ -314,7 +314,7 @@ def main():
args = parser.parse_args() args = parser.parse_args()
# Select device (distibuted not available) # Select device (distibuted not available)
args.device = torch.device("cuda" if torch.cuda.is_available() and not args.to_cpu else "cpu") args.device = torch.device("cuda" if torch.cuda.is_available() and not args.no_cuda else "cpu")
# Check the existence of directories # Check the existence of directories
if not args.summaries_output_dir: if not args.summaries_output_dir:
......
...@@ -9,4 +9,4 @@ regex ...@@ -9,4 +9,4 @@ regex
# For XLNet # For XLNet
sentencepiece sentencepiece
# For XLM # For XLM
sacremoses sacremoses
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment