-
Notifications
You must be signed in to change notification settings - Fork 1
/
constants.py
65 lines (59 loc) · 1.98 KB
/
constants.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
61
62
63
64
65
import os
from mobile_kube.envs import (
SimEdgeEnv,
SimBinpackingEnv,
SimGreedyEnv,
KubeEdgeEnv,
KubeBinpackingEnv,
KubeGreedyEnv
)
# dfined by the user
# DATA_PATH = "/home/jdoyledithencom/data-repos/myenv"
# DATA_PATH = "/Users/saeid/Codes/mobile-kube/data"
# DATA_PATH = "/data/home/acw498/mobile-kube/data"
DATA_PATH = "/homes/sg324/mobile-kube/data"
# DATA_PATH = "/home/sdghafouri/mobile-kube/data"
# DATA_PATH = "/home/saeid/mobile-kube/data"
# generated baesd on the users' path
DATASETS_PATH = os.path.join(DATA_PATH, "datasets")
TRAIN_RESULTS_PATH = os.path.join(DATA_PATH, "train-results")
TESTS_RESULTS_PATH = os.path.join(DATA_PATH, "test-results")
CONFIGS_PATH = os.path.join(DATA_PATH, "configs")
BACKUP_PATH = os.path.join(DATA_PATH, "backup")
PLOTS_PATH = os.path.join(DATA_PATH, "plots")
DATASETS_METADATA_PATH = os.path.join(DATA_PATH, "dataset_metadata")
def _create_dirs():
"""
create directories if they don't exist
"""
if not os.path.exists(DATASETS_PATH):
os.makedirs(DATASETS_PATH)
if not os.path.exists(TRAIN_RESULTS_PATH):
os.makedirs(TRAIN_RESULTS_PATH)
if not os.path.exists(CONFIGS_PATH):
os.makedirs(CONFIGS_PATH)
if not os.path.exists(BACKUP_PATH):
os.makedirs(BACKUP_PATH)
if not os.path.exists(TESTS_RESULTS_PATH):
os.makedirs(TESTS_RESULTS_PATH)
if not os.path.exists(DATASETS_METADATA_PATH):
os.makedirs(DATASETS_METADATA_PATH)
if not os.path.exists(PLOTS_PATH):
os.makedirs(PLOTS_PATH)
_create_dirs()
ENVS = {
'sim-edge': SimEdgeEnv,
'sim-binpacking': SimBinpackingEnv,
'sim-greedy': SimGreedyEnv,
'kube-edge': KubeEdgeEnv,
'kube-binpacking': KubeBinpackingEnv,
'kube-greedy': KubeGreedyEnv
}
ENVSMAP = {
'sim-edge': 'SimEdgeEnv-v0',
'sim-binpacking': 'SimBinpackingEnv-v0',
'sim-greedy': 'SimGreedyEnv-v0',
'kube-edge': 'KubeEdgeEnv-v0',
'kube-binpacking': 'KubeBinpackingEnv-v0',
'kube-greedy': 'KubeGreedyEnv-v0',
}