-
Notifications
You must be signed in to change notification settings - Fork 0
/
params.py
145 lines (127 loc) · 3.63 KB
/
params.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
import os
from tensorflow.keras.optimizers import Adam
################## VARIABLES #####################
clean_param = {
"concatenate":False,
"url_label":"[URL]",
"usr_label":"[USERNAME]",
"functions":[True,True,True,True,True,True,True,True,True,True,True]
}
preproc_params_LSTM = {
"max_length":100,
"vector_size":50,
"window":5,
"embed":False,
"lower":True,
"split":" ",
"dtype":"float32",
"padding":"post",
"bidirectional":False
}
model_params_LSTM = {
"lstm_units":50,
"lstm_activation":"tanh",
"loss":"binary_crossentropy",
"optimizer":"rmsprop",
"batch_size":64,
"patience":2,
"validation_split":0.2
}
preproc_params_LSTM_bidir = {
"max_length":100,
"vector_size":50,
"window":5,
"embed":True,
"lower":True,
"split":" ",
"dtype":"float32",
"padding":"post",
"bidirectional":True
}
model_params_LSTM_bidir = {
"lstm_units":50,
"lstm_activation":"tanh",
"loss":"binary_focal_crossentropy",
"optimizer":"rmsprop",
"batch_size":64,
"patience":2,
"validation_split":0.2
}
preproc_params_GRU = {
"max_length":100,
"vector_size":50,
"window":5,
"lower":True,
"split":" ",
"dtype":"float32",
"padding":"post",
}
model_params_GRU = {
"gru_units":50,
"gru_activation":"tanh",
"loss":"binary_crossentropy",
"optimizer":"rmsprop",
"batch_size":64,
"patience":2,
"validation_split":0.2
}
preproc_params_c1d = {
"max_length":100,
"vector_size":50,
"window":5,
"lower":False,
"split":" ",
"dtype":"float32",
"padding":"post",
}
model_params_c1d = {
"embedding_size":100,
"loss":"binary_crossentropy",
"optimizer":Adam(learning_rate=0.001),
"globalmax":True,
"complex":True,
"batch_size":64,
"patience":1,
"validation_split":0.2
}
preproc_params_LSTM_embed = {
"max_length":100,
"vector_size":50,
"window":5,
"embed":True,
"lower":True,
"split":" ",
"dtype":"float32",
"padding":"post",
"bidirectional":False
}
model_params_LSTM_embed = {
"lstm_units":50,
"lstm_activation":"tanh",
"loss":"binary_crossentropy",
"optimizer":"rmsprop",
"batch_size":64,
"patience":1,
"validation_split":0.2
}
################## MLFLOW #####################
MODEL_TARGET="mlflow"
MLFLOW_TRACKING_URI="https://mlflow.lewagon.ai"
MLFLOW_EXPERIMENT="You_are_not_sexist-experiment"
MLFLOW_MODEL_NAME="You_are_not_sexist-model"
################## Prefect ####################
PREFECT_FLOW_NAME="you-are-not-sexist"
PREFECT_LOG_LEVEL="WARNING"
################## GCP #####################
GCP_PROJECT = "youre-not-sexist" #os.environ.get("GCP_PROJECT")
GCP_PROJECT_WAGON = "" #os.environ.get("GCP_PROJECT_WAGON")
GCP_REGION = "europe-west9" #os.environ.get("GCP_REGION")
BQ_DATASET = "merged_df_en" #os.environ.get("BQ_DATASET")
BQ_REGION = "europe-west9" #os.environ.get("BQ_REGION")
BUCKET_NAME = "youre-not-sexist" #os.environ.get("BUCKET_NAME")
# os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = os.environ.get("GCP_key")
################## CONSTANTS #####################
LOCAL_RAW_DATA_PATH = os.path.join(os.path.expanduser('~'),"code","Esmedd", "detecting-sexism", "data", "raw_data", "merged_df_en.csv")
LOCAL_CLEANED_DATA_PATH = os.path.join(os.path.expanduser('~'),"code","Esmedd", "detecting-sexism", "data", "cleaned_data")
LOCAL_PROCESSED_DATA_PATH = os.path.join(os.path.expanduser('~'),"code","Esmedd", "detecting-sexism", "data", "processed_data")
LOCAL_REGISTRY_PATH = os.path.join(os.path.expanduser('~'), "code","Esmedd", "detecting-sexism", "training_outputs")