From 431ab19d7a467905018b165bc29b2a1130c1b188 Mon Sep 17 00:00:00 2001 From: Sam Shleifer Date: Mon, 31 Aug 2020 17:59:34 -0400 Subject: [PATCH] [fix] typo in available in helper function (#6859) --- examples/test_examples.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/test_examples.py b/examples/test_examples.py index 40bfd2c81a..f9fd5bc126 100644 --- a/examples/test_examples.py +++ b/examples/test_examples.py @@ -53,7 +53,7 @@ def get_setup_file(): return args.f -def is_cuda_and_apex_avaliable(): +def is_cuda_and_apex_available(): is_using_cuda = torch.cuda.is_available() and torch_device == "cuda" return is_using_cuda and is_apex_available() @@ -85,7 +85,7 @@ class ExamplesTests(TestCasePlus): testargs += "--output_dir " + output_dir testargs = testargs.split() - if is_cuda_and_apex_avaliable(): + if is_cuda_and_apex_available(): testargs.append("--fp16") with patch.object(sys, "argv", testargs): @@ -115,7 +115,7 @@ class ExamplesTests(TestCasePlus): """.split() if torch.cuda.is_available(): testargs += ["--gpus=1"] - if is_cuda_and_apex_avaliable(): + if is_cuda_and_apex_available(): testargs.append("--fp16") with patch.object(sys, "argv", testargs): @@ -195,7 +195,7 @@ class ExamplesTests(TestCasePlus): testargs = ["run_generation.py", "--prompt=Hello", "--length=10", "--seed=42"] - if is_cuda_and_apex_avaliable(): + if is_cuda_and_apex_available(): testargs.append("--fp16") model_type, model_name = (