forgot that call only worked if shell=True

This commit is contained in:
mrq 2023-02-18 14:14:42 +00:00
parent 2615cafd75
commit 0dd5640a89

View File

@ -443,7 +443,7 @@ def run_training(config_path):
global training_process global training_process
torch.multiprocessing.freeze_support() torch.multiprocessing.freeze_support()
cmd = ['call' '.\\train.bat', config_path] if os.name == "nt" else ['bash', './train.sh', config_path] cmd = ['train.bat', config_path] if os.name == "nt" else ['bash', './train.sh', config_path]
print("Spawning process: ", " ".join(cmd)) print("Spawning process: ", " ".join(cmd))
training_process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) training_process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)