-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconstants.py
74 lines (59 loc) · 2.1 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
66
67
68
69
70
71
72
73
74
from __future__ import division
import pwd
import os
__author__ = 'James Robert Lloyd'
__description__ = 'Constants'
# Universal constants
NUMPY_SAVE = False # whether to use numpy instead of pickle to save arrays
ORIGINAL = 'original'
DENSE = 'dense'
CONVERT_TO_DENSE = 'convert to dense'
DEBUG = False
ZEROMQ_PORT = 5555
# User-dependent constants
_user = pwd.getpwuid(os.getuid())[0]
import socket
_machine = socket.gethostname()
if _user == 'azureuser': # running on codalab
SAVE_DIR = './tmp'
OVERHEAD = 2 * 2 ** 30
CGROUP_SOFT_LIMIT = 6 * 2 ** 30
CGROUP_HARD_LIMIT = 2 * 2 ** 30
LOGFILE = None
elif _user == 'evs25':
import matplotlib
matplotlib.use("tkAgg") # tkinter isn't installed on codalab
_temp_dir = '/tmp/automl-2015' # only used in this file
# TEST_OUTPUT_DIR = "../predictions/test/stacking"
TEST_OUTPUT_DIR = _temp_dir + "/predictions"
TEST_INPUT_DIR = os.path.join('..', 'data', 'phase_1_cv_fold_01')
# TEST_INPUT_DIR = os.path.join('..', 'data', 'phase_0')
# TEST_INPUT_DIR = os.path.join('..', 'data', 'demo')
SAVE_DIR = _temp_dir + '/save'
MOVIE_TEMP_DIR = _temp_dir + '/movie'
STACK_DATA_FL = _temp_dir + '/stacking_data.csv'
LOGFILE = _temp_dir + '/auto-ml.log'
OVERHEAD = 0.5 * 2 ** 30
CGROUP_SOFT_LIMIT = 1 * 2 ** 30
CGROUP_HARD_LIMIT = 0.5 * 2 ** 30
DEBUG = True
elif _user == 'jrl44' or _machine == 'sagarmatha':
TEST_OUTPUT_DIR = "../predictions/test/stacking"
TEST_INPUT_DIR = os.path.join('..', 'data', 'demo')
SAVE_DIR = 'temp/save'
MOVIE_TEMP_DIR = '../movie_temp'
STACK_DATA_FL = '../stacking-data/stacking_data.csv'
LOGFILE = 'temp/log/auto-ml.log'
OVERHEAD = 2 * 2 ** 30
# OVERHEAD = 46 * 2 ** 30
CGROUP_SOFT_LIMIT = 6 * 2 ** 30
CGROUP_HARD_LIMIT = 2 * 2 ** 30
DEBUG = True
else: # some reasonable defaults
TEST_OUTPUT_DIR = "./output"
TEST_INPUT_DIR = os.path.join('..', 'data', 'demo')
SAVE_DIR = '/tmp/automl-2015'
MOVIE_TEMP_DIR = '../movie_temp'
OVERHEAD = 2 * 2 ** 30
CGROUP_SOFT_LIMIT = 6 * 2 ** 30
CGROUP_HARD_LIMIT = 2 * 2 ** 30