-
Notifications
You must be signed in to change notification settings - Fork 265
/
Copy pathexperiments.py
60 lines (52 loc) · 1.38 KB
/
experiments.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
54
55
56
57
58
59
60
from pdb import set_trace as T
from configs import Law, Chaos
import os
#Oversimplified user specification
#for 1-3 collaborators
USER = 'your-username'
if USER == 'your-username':
#Thousandth
prefix = 'test'
remote = False
local = not remote
test = True#local
best = True#local
load = True#local
sample = not test
singles = True
tournaments = False
exps = {}
szs = [128]
#For full distributed runs
#szs = (16, 32, 64, 128)
names = 'law chaos'.split()
confs = (Law, Chaos)
def makeExp(name, conf, sz, test=False):
NENT, NPOP = sz, sz//16
ROOT = 'resource/exps/' + name + '/'
try:
os.mkdir(ROOT)
os.mkdir(ROOT + 'model')
os.mkdir(ROOT + 'train')
os.mkdir(ROOT + 'test')
except FileExistsError:
pass
MODELDIR = ROOT + 'model/'
exp = conf(remote,
NENT=NENT, NPOP=NPOP,
MODELDIR=MODELDIR,
SAMPLE=sample,
BEST=best,
LOAD=load,
TEST=test)
exps[name] = exp
print(name, ', NENT: ', NENT, ', NPOP: ', NPOP)
def makeExps():
#Training runs
for label, conf in zip(names, confs):
for sz in szs:
name = prefix + label + str(sz)
makeExp(name, conf, sz, test=test)
#Sample config
makeExps()
makeExp('sample', Chaos, 128, test=True)