[c49071]: / Scripts / M1 / Train-Batch_run.py

Download this file

21 lines (18 with data), 636 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#-*- coding:utf-8 -*-
#########################
# filename: run.py
#########################
import subprocess,sys
sys.path.append("..")
cmds = [
'python dnngp_runner.py --batch_size 28 --patience 5 --lr 0.001 --dropout2 0.3 --seed 123 --epoch 5 --cv 5 --part 1 --earlystopping 10 --snp ".../Input_files/wheat599_pc95.pkl" --pheno ".../Input_files/wheat1.tsv" --output .../Output_files/'
]
for cmd in cmds:
p = subprocess.Popen(
cmd, shell=True, stdout=subprocess.PIPE
)
str=p.stdout.read()
try:
print(str.decode('utf-8'))
except Exception:
print(str.decode('gbk'))