forked from njustesen/a2c_gvgai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
list.py
39 lines (27 loc) · 1000 Bytes
/
list.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
import tensorflow as tf
import argparse
from level_selector import *
from model import Model
from runner import Runner
from env import *
from baselines.a2c.utils import make_path
from baselines.a2c.policies import CnnPolicy
from baselines.common import set_global_seeds
from baselines.ppo2.policies import CnnPolicy, LstmPolicy, LnLstmPolicy
def main():
exp_path = './results/*/'
for exp_folder in glob.iglob(exp_path):
# Experiment name
exp_name = exp_folder.split('/')[-2]
print(exp_name)
path = os.path.join(exp_folder, 'models/*/')
for folder in glob.iglob(path):
steps = 0
exp_id = folder.split('/')[-2]
for model_meta_name in glob.iglob(folder + '/*.meta'):
s = int(model_meta_name.split('.meta')[0].split('/')[-1].split("-")[1])
if s >= steps:
steps = s
print('\t' + exp_id + '\t' + str(steps))
if __name__ == '__main__':
main()