-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathconstants.h
More file actions
198 lines (181 loc) · 10.4 KB
/
Copy pathconstants.h
File metadata and controls
198 lines (181 loc) · 10.4 KB
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#pragma once
namespace reinforcement_learning
{
#ifdef _WIN32
const char* const PATH_DELIMITER = "\\";
const char* const DEV_NULL = "nul";
#else
const char* const PATH_DELIMITER = "/";
const char* const DEV_NULL = "/dev/null";
#endif
namespace name
{
const char* const APP_ID = "appid";
const char* const MODEL_SRC = "model.source";
const char* const MODEL_BLOB_URI = "model.blob.uri";
const char* const MODEL_REFRESH_INTERVAL_MS = "model.refreshintervalms";
const char* const MODEL_IMPLEMENTATION = "model.implementation"; // VW vs other ML
const char* const MODEL_BACKGROUND_REFRESH = "model.backgroundrefresh";
const char* const MODEL_VW_INITIAL_COMMAND_LINE = "model.vw.initial_command_line";
const char* const VW_CMDLINE = "vw.commandline";
const char* const VW_POOL_INIT_SIZE = "vw.pool.init.size";
const char* const INITIAL_EPSILON = "initial_exploration.epsilon";
const char* const LEARNING_MODE = "rank.learning.mode";
const char* const PROTOCOL_VERSION = "protocol.version";
const char* const HTTP_API_KEY = "http.api.key";
const char* const HTTP_API_HEADER_KEY_NAME = "http.api.header.key.name";
const char* const AUDIT_ENABLED = "audit.enabled";
const char* const AUDIT_OUTPUT_PATH = "audit.output.path";
// Episode
const char* const EPISODE_EH_HOST = "episode.eventhub.host";
const char* const EPISODE_EH_NAME = "episode.eventhub.name";
const char* const EPISODE_EH_KEY_NAME = "episode.eventhub.keyname";
const char* const EPISODE_EH_KEY = "episode.eventhub.key";
const char* const EPISODE_EH_TASKS_LIMIT = "episode.eventhub.tasks_limit";
const char* const EPISODE_EH_MAX_HTTP_RETRIES = "episode.eventhub.max_http_retries";
const char* const EPISODE_EH_MAX_HTTP_RETRY_DURATION_MS = "episode.eventhub.max_http_retry_duration_ms";
const char* const EPISODE_SENDER_IMPLEMENTATION = "episode.sender.implementation";
const char* const EPISODE_HTTP_API_HOST = "episode.http.api.host";
const char* const EPISODE_APIM_TASKS_LIMIT = "episode.apim.tasks_limit";
const char* const EPISODE_APIM_MAX_HTTP_RETRIES = "episode.apim.max_http_retries";
const char* const EPISODE_APIM_MAX_HTTP_RETRY_DURATION_MS = "episode.apim.max_http_retry_duration_ms";
// Interaction
const char* const INTERACTION_EH_HOST = "interaction.eventhub.host";
const char* const INTERACTION_EH_NAME = "interaction.eventhub.name";
const char* const INTERACTION_EH_KEY_NAME = "interaction.eventhub.keyname";
const char* const INTERACTION_EH_KEY = "interaction.eventhub.key";
const char* const INTERACTION_EH_TASKS_LIMIT = "interaction.eventhub.tasks_limit";
const char* const INTERACTION_EH_MAX_HTTP_RETRIES = "interaction.eventhub.max_http_retries";
const char* const INTERACTION_EH_MAX_HTTP_RETRY_DURATION_MS = "interaction.eventhub.max_http_retry_duration_ms";
const char* const INTERACTION_SEND_HIGH_WATER_MARK = "interaction.send.highwatermark";
const char* const INTERACTION_SEND_QUEUE_MAX_CAPACITY_KB = "interaction.send.queue.maxcapacity.kb";
const char* const INTERACTION_SEND_BATCH_INTERVAL_MS = "interaction.send.batchintervalms";
const char* const INTERACTION_SENDER_IMPLEMENTATION = "interaction.sender.implementation";
const char* const INTERACTION_USE_COMPRESSION = "interaction.send.use_compression";
const char* const INTERACTION_USE_DEDUP = "interaction.send.use_dedup";
const char* const INTERACTION_QUEUE_MODE = "interaction.queue.mode";
const char* const INTERACTION_HTTP_API_HOST = "interaction.http.api.host";
const char* const INTERACTION_APIM_TASKS_LIMIT = "interaction.apim.tasks_limit";
const char* const INTERACTION_APIM_MAX_HTTP_RETRIES = "interaction.apim.max_http_retries";
const char* const INTERACTION_APIM_MAX_HTTP_RETRY_DURATION_MS = "interaction.apim.max_http_retry_duration_ms";
const char* const INTERACTION_SUBSAMPLE_RATE = "interaction.subsample.rate";
// Observation
const char* const OBSERVATION_EH_HOST = "observation.eventhub.host";
const char* const OBSERVATION_EH_NAME = "observation.eventhub.name";
const char* const OBSERVATION_EH_KEY_NAME = "observation.eventhub.keyname";
const char* const OBSERVATION_EH_KEY = "observation.eventhub.key";
const char* const OBSERVATION_EH_TASKS_LIMIT = "observation.eventhub.tasks_limit";
const char* const OBSERVATION_EH_MAX_HTTP_RETRIES = "observation.eventhub.max_http_retries";
const char* const OBSERVATION_EH_MAX_HTTP_RETRY_DURATION_MS = "observation.eventhub.max_http_retry_duration_ms";
const char* const OBSERVATION_SEND_HIGH_WATER_MARK = "observation.send.highwatermark";
const char* const OBSERVATION_SEND_QUEUE_MAX_CAPACITY_KB = "observation.send.queue.maxcapacity.kb";
const char* const OBSERVATION_SEND_BATCH_INTERVAL_MS = "observation.send.batchintervalms";
const char* const OBSERVATION_SENDER_IMPLEMENTATION = "observation.sender.implementation";
const char* const OBSERVATION_USE_COMPRESSION = "observation.send.use_compression";
const char* const OBSERVATION_QUEUE_MODE = "observation.queue.mode";
const char* const OBSERVATION_HTTP_API_HOST = "observation.http.api.host";
const char* const OBSERVATION_APIM_TASKS_LIMIT = "observation.apim.tasks_limit";
const char* const OBSERVATION_APIM_MAX_HTTP_RETRIES = "observation.apim.max_http_retries";
const char* const OBSERVATION_APIM_MAX_HTTP_RETRY_DURATION_MS = "observation.apim.max_http_retry_duration_ms";
const char* const OBSERVATION_SUBSAMPLE_RATE = "observation.subsample.rate";
// global sender properties
const char* const SEND_HIGH_WATER_MARK = "send.highwatermark";
const char* const SEND_QUEUE_MAX_CAPACITY_KB = "send.queue.maxcapacity.kb";
const char* const SEND_BATCH_INTERVAL_MS = "send.batchintervalms";
const char* const USE_COMPRESSION = "send.use_compression";
const char* const USE_DEDUP = "send.use_dedup";
const char* const QUEUE_MODE = "queue.mode";
const char* const SUBSAMPLE_RATE = "subsample.rate";
const char* const SENDER_IMPLEMENTATION = "sender.implementation";
const char* const EH_TEST = "eventhub.mock";
const char* const TRACE_LOG_IMPLEMENTATION = "trace.logger.implementation";
const char* const EPISODE_FILE_NAME = "episode.file.name";
const char* const INTERACTION_FILE_NAME = "interaction.file.name";
const char* const OBSERVATION_FILE_NAME = "observation.file.name";
const char* const TIME_PROVIDER_IMPLEMENTATION = "time_provider.implementation";
const char* const HTTP_CLIENT_DISABLE_CERT_VALIDATION = "http.certvalidation.disable";
const char* const HTTP_CLIENT_TIMEOUT = "http.timeout"; // Timeout is in seconds, default is 30.
const char* const MODEL_FILE_NAME = "model_file_loader.file_name";
const char* const MODEL_FILE_MUST_EXIST = "model_file_loader.file_must_exist";
const char* const ZSTD_COMPRESSION_LEVEL = "zstd.compression_level";
#ifdef RL_BUILD_FEDERATION
// local joiner for federated learning
const char* const JOINER_EUD_DURATION = "eud.duration";
const char* const JOINER_PROBLEM_TYPE = "joiner.problem.type";
const char* const JOINER_REWARD_FUNCTION = "joiner.reward.function";
const char* const JOINER_LEARNING_MODE = "joiner.learning.mode";
#endif
} // namespace name
} // namespace reinforcement_learning
namespace reinforcement_learning
{
namespace value
{
const char* const AZURE_STORAGE_BLOB = "AZURE_STORAGE_BLOB";
const char* const NO_MODEL_DATA = "NO_MODEL_DATA";
const char* const HTTP_MODEL_DATA = "HTTP_MODEL_DATA";
const char* const FILE_MODEL_DATA = "FILE_MODEL_DATA";
const char* const VW = "VW";
const char* const PASSTHROUGH_PDF_MODEL = "PASSTHROUGH_PDF";
const char* const EPISODE_EH_SENDER = "EPISODE_EH_SENDER";
const char* const OBSERVATION_EH_SENDER = "OBSERVATION_EH_SENDER";
const char* const INTERACTION_EH_SENDER = "INTERACTION_EH_SENDER";
const char* const EPISODE_FILE_SENDER = "EPISODE_FILE_SENDER";
const char* const OBSERVATION_FILE_SENDER = "OBSERVATION_FILE_SENDER";
const char* const INTERACTION_FILE_SENDER = "INTERACTION_FILE_SENDER";
const char* const EPISODE_HTTP_API_SENDER = "EPISODE_HTTP_API_SENDER";
const char* const OBSERVATION_HTTP_API_SENDER = "OBSERVATION_HTTP_API_SENDER";
const char* const INTERACTION_HTTP_API_SENDER = "INTERACTION_HTTP_API_SENDER";
const char* const NULL_TRACE_LOGGER = "NULL_TRACE_LOGGER";
const char* const CONSOLE_TRACE_LOGGER = "CONSOLE_TRACE_LOGGER";
const char* const NULL_TIME_PROVIDER = "NULL_TIME_PROVIDER";
const char* const CLOCK_TIME_PROVIDER = "CLOCK_TIME_PROVIDER";
const char* const LEARNING_MODE_ONLINE = "ONLINE";
const char* const LEARNING_MODE_APPRENTICE = "APPRENTICE";
const char* const LEARNING_MODE_LOGGINGONLY = "LOGGINGONLY";
const char* const CONTENT_ENCODING_IDENTITY = "IDENTITY";
const char* const CONTENT_ENCODING_DEDUP = "DEDUP";
const char* const HTTP_API_DEFAULT_HEADER_KEY_NAME = "Ocp-Apim-Subscription-Key";
const char* const QUEUE_MODE_DROP = "DROP";
const char* const QUEUE_MODE_BLOCK = "BLOCK";
const bool DEFAULT_MODEL_BACKGROUND_REFRESH = true;
const int DEFAULT_VW_POOL_INIT_SIZE = 4;
const int DEFAULT_PROTOCOL_VERSION = 1;
const char* const DEFAULT_AUDIT_OUTPUT_PATH = "audit";
#ifdef RL_BUILD_FEDERATION
// Configuration values for local joiner
const char* const PROBLEM_TYPE_UNKNOWN = "PROBLEM_TYPE_UNKNOWN";
const char* const PROBLEM_TYPE_CB = "PROBLEM_TYPE_CB";
const char* const PROBLEM_TYPE_CCB = "PROBLEM_TYPE_CCB";
const char* const PROBLEM_TYPE_SLATES = "PROBLEM_TYPE_SLATES";
const char* const PROBLEM_TYPE_CA = "PROBLEM_TYPE_CA";
const char* const PROBLEM_TYPE_MULTISTEP = "PROBLEM_TYPE_MULTISTEP";
const char* const REWARD_FUNCTION_EARLIEST = "REWARD_FUNCTION_EARLIEST";
const char* const REWARD_FUNCTION_AVERAGE = "REWARD_FUNCTION_AVERAGE";
const char* const REWARD_FUNCTION_MEDIAN = "REWARD_FUNCTION_MEDIAN";
const char* const REWARD_FUNCTION_SUM = "REWARD_FUNCTION_SUM";
const char* const REWARD_FUNCTION_MIN = "REWARD_FUNCTION_MEAN";
const char* const REWARD_FUNCTION_MAX = "REWARD_FUNCTION_MAX";
#endif
// These are outside of #ifdef section so that we can recognize them as invalid
// configuration options when rlclientlib is compiled without RL_BUILD_FEDERATION
//
// Use federated_loop_controller for model data
const char* const LOCAL_LOOP_MODEL_DATA = "LOCAL_LOOP_MODEL_DATA";
// Send events to federated_loop_controller
const char* const LOCAL_LOOP_SENDER = "LOCAL_LOOP_SENDER";
const char* get_default_episode_sender();
const char* get_default_observation_sender();
const char* get_default_interaction_sender();
const char* get_default_data_transport();
const char* get_default_time_provider();
} // namespace value
} // namespace reinforcement_learning
namespace reinforcement_learning
{
namespace constants
{
// subsampling uses drop_pass of -1 to avoid collision with the queue's pruning function
constexpr int SUBSAMPLE_RATE_DROP_PASS = -1;
} // namespace constants
} // namespace reinforcement_learning