-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
51 lines (46 loc) · 1.13 KB
/
config.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
from pathlib import Path
def base_config():
N = 200
alpha = 0.01
alpha_list = [0.1 * x for x in range(1, 11)]
# alpha_list = [0.02, 0.05, 0.1, 0.2, 0.5]
nfiles = 200
k = 5
T = 10
T_0 = 1000 #
eta = 0.01
theta = None
squeeze_factor = 1
R = None
weights = None
a = None
W = None
p = None
f = None
f_list = []
n_iters = 100
cnt = 0
algo = "hedge"
algo_list = ["hedge", "lru", "ftpl", "lfu"]
assert all(algo in ["hedge", "oco", "ftpl", "lru", "lfu"] for algo in algo_list)
method = "large"
assert method in ["iterative", "direct", "large"]
cache = {}
fig_root = Path('./figures/')
log_root = Path('./logs/')
expt_name = ''
resume = False
filename = ''
sample = "all"
assert sample in ["all", "top", "random", "bottom", "inv_prop"]
dataset = "wiki"
assert dataset in ["wiki", "movielens", "mit"]
lim1 = 1
lim2 = lim1 + 20
order = 2
named_configs = [base_config]
def initialise(ex):
ex.config(base_config)
for named_config in named_configs:
ex.named_config(named_config)
return ex