-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_trpo_k_test.py
46 lines (34 loc) · 1.74 KB
/
run_trpo_k_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import subprocess
import numpy as np
number_of_equal_runs = 5
python_interpreter = #!INSERT PATH TO PYTHON INTERPRETER HERE
data_path = 'data'
iterations = str(150)
k_vals = [3, 50, 100, 200, 500, 1000]
subdir = 'k_test_100-1000'
base_log_name = 'PPO_k_'
# Run the test for different sigma values
for j in range(0,number_of_equal_runs):
for k in k_vals:
log_name = base_log_name + str(k) + '_number_' + str(j)
print('subdir: ' + subdir + ' log_name: ' + log_name)
command = [python_interpreter, 'main.py', '--use_ppo', 'True', '--path', data_path,'--subdir', subdir, '--log_name', log_name, '--it', iterations, '--n_steps', '1024', '--re3_k', str(k)]
subprocess.run(command)
# push to git
# subprocess.run(['git', 'pull'])
# subprocess.run(['git', 'add', '-A'])
# subprocess.run(['git', 'commit', '-m', 'Automated push: Test for k_test = ' + str(k) + ' number ' + str(j)])
# subprocess.run(['git', 'push'])
base_log_name = 'TRPO_k_'
# Run the test for different sigma values
for j in range(0,number_of_equal_runs):
for k in k_vals:
log_name = base_log_name + str(k) + '_number_' + str(j)
print('subdir: ' + subdir + ' log_name: ' + log_name)
command = [python_interpreter, 'main.py', '--use_trpo', 'True', '--path', data_path,'--subdir', subdir, '--log_name', log_name, '--it', iterations, '--n_steps', '1024', '--re3_k', str(k)]
subprocess.run(command)
# push to git
# subprocess.run(['git', 'pull'])
# subprocess.run(['git', 'add', '-A'])
# subprocess.run(['git', 'commit', '-m', 'Automated push: Test for k_test = ' + str(k) + ' number ' + str(j)])
# subprocess.run(['git', 'push'])