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