Fx gpu_id arg in pretrain

This commit is contained in:
Matthw Honnibal 2019-10-23 04:41:40 +02:00
parent 95648dcdd7
commit f8bf5b7fe5

View File

@ -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()