From fc61c200c085f78fa2af4850aa8dc8e832fb80d0 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Fri, 3 Jul 2020 19:23:30 +0200 Subject: [PATCH] DDp interpreter (#2482) * interpreter * chlog --- CHANGELOG.md | 2 ++ pytorch_lightning/trainer/distrib_data_parallel.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e77fd63661783..41bc8095b8d93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Fixed +- Fixed using the same DDP python interpreter and actually running ([#2482](https://github.com/PyTorchLightning/pytorch-lightning/pull/2482)) + ## [0.8.4] - 2020-07-01 diff --git a/pytorch_lightning/trainer/distrib_data_parallel.py b/pytorch_lightning/trainer/distrib_data_parallel.py index ebf93c87e69df..46dcdbbb0af47 100644 --- a/pytorch_lightning/trainer/distrib_data_parallel.py +++ b/pytorch_lightning/trainer/distrib_data_parallel.py @@ -419,7 +419,8 @@ def spawn_ddp_children(self, model): full_path = abspath(command[0]) command[0] = full_path - command = ['python'] + command + # use the same python interpreter and actually running + command = [sys.executable] + command # since this script sets the visible devices we replace the gpus flag with a number num_gpus = os.environ['CUDA_VISIBLE_DEVICES'].split(',').__len__()