From 3abc3a1d3254547a640a1ee0353c89ef33faf021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Fri, 10 Sep 2021 08:28:10 +0000 Subject: [PATCH] Fix GPU init in tests --- tests/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/__init__.py b/tests/__init__.py index 2b07004f..45aee23a 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -7,8 +7,8 @@ from TTS.utils.generic_utils import get_cuda def get_device_id(): use_cuda, _ = get_cuda() if use_cuda: - if 'CUDA_VISIBLE_DEVICES' in os.environ and os.environ['CUDA_VISIBLE_DEVICES'] != "": - GPU_ID = os.environ['CUDA_VISIBLE_DEVICES'].split(',')[0] + if "CUDA_VISIBLE_DEVICES" in os.environ and os.environ["CUDA_VISIBLE_DEVICES"] != "": + GPU_ID = os.environ["CUDA_VISIBLE_DEVICES"].split(",")[0] else: GPU_ID = "0" else: