From f8bf5b7fe58faa495b57906e929775c9e1be9132 Mon Sep 17 00:00:00 2001 From: Matthw Honnibal Date: Wed, 23 Oct 2019 04:41:40 +0200 Subject: [PATCH] Fx gpu_id arg in pretrain --- spacy/cli/pretrain.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spacy/cli/pretrain.py b/spacy/cli/pretrain.py index f2e500c2d..ba924f5e8 100644 --- a/spacy/cli/pretrain.py +++ b/spacy/cli/pretrain.py @@ -137,7 +137,9 @@ def pretrain( util.fix_random_seed(seed) if gpu_id != -1: has_gpu = require_gpu(gpu_id=gpu_id) - msg.info("Using GPU {}".format(gpu_id) if has_gpu else "Not using GPU") + msg.info("Using GPU {}".format(gpu_id)) + else: + msg.info("Not using GPU") output_dir = Path(output_dir) if not output_dir.exists(): output_dir.mkdir()