-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_standard_test.py
53 lines (38 loc) · 2.19 KB
/
run_standard_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
47
48
49
50
51
52
53
import subprocess
import numpy as np
subprocess.run(['git', 'pull'])
subprocess.run(['git', 'add', '-A'])
subprocess.run(['git', 'commit', '-m', 'Automated push: Test for sigma'])
subprocess.run(['git', 'push'])
theta = str(0)
sigma = str(0)
iterations = str(150)
number_of_equal_runs = 20
python_interpreter = #!INSERT PATH TO PYTHON INTERPRETER HERE
path = '/home/thops19/Documents/9semester/Project-in-Artificial-Intelligence-gym-challenge-/'
data_path = 'data'
subdir = 'standard_test'
base_log_name = 'PPO_standard'
# Run the test for different sigma values
for j in range(0,number_of_equal_runs):
log_name = base_log_name + '_number_' + str(j)
print('subdir: ' + subdir + ' log_name: ' + log_name)
command = [python_interpreter, path+'main.py', '--use_ppo', 'True', '--path', data_path,'--subdir', subdir, '--log_name', log_name, '--it', iterations, '--n_steps', '1024', '--sigma', str(sigma), '--theta', str(theta)]
subprocess.run(command)
# push to git
# subprocess.run(['git', 'pull'])
# subprocess.run(['git', 'add', '-A'])
# subprocess.run(['git', 'commit', '-m', 'Automated push: Test for sigma = ' + str(sigma) + ' number ' + str(j)])
# subprocess.run(['git', 'push'])
base_log_name = 'TRPO_standard'
for j in range(0,number_of_equal_runs):
log_name = base_log_name + '_number_' + str(j)
print('subdir: ' + subdir + ' log_name: ' + log_name)
command = [python_interpreter, path+'main.py', '--use_trpo', 'True', '--path', data_path,'--subdir', subdir, '--log_name', log_name, '--it', iterations, '--n_steps', '1024', '--sigma', str(sigma), '--theta', str(theta)]
subprocess.run(command)
# push to git
# subprocess.run(['git', 'pull'])
# subprocess.run(['git', 'add', '-A'])
# subprocess.run(['git', 'commit', '-m', 'Automated push: Test for sigma = ' + str(sigma) + ' number ' + str(j)])
# subprocess.run(['git', 'push'])
# ['/home/thops19/Documents/9semester/PPO-for-Beginners/venv/bin/python', '/home/thops19/Documents/9semester/Project-in-Artificial-Intelligence-gym-challenge-/iem-ppo.py', '--path', 'data', '--subdir', 'sigma_test', '--log_name', 'sigma_0.050_number_0', '--it', 150, '--n_steps 1024 --sigma 0.05 --theta 0.5