-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathoptimus_template.yaml
More file actions
207 lines (201 loc) · 8.24 KB
/
optimus_template.yaml
File metadata and controls
207 lines (201 loc) · 8.24 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
199
200
201
202
203
204
205
206
207
logging:
# The desired logging level.
# Allowed values are "debug", "info", "warn", "error", "panic" and "fatal"
level: debug
# Resource restrictions settings.
restrictions:
# CGroup name for Optimus.
cgroup_name: /optimus
# Maximum CPU cores allowed for consumption.
cpu_count: 0.5
# Global account settings.
# Used by all components unless overridden.
ethereum: ðereum
# Path to the keystore.
key_store: "{{KEYSTORE}}"
# Passphrase for the keystore.
pass_phrase: {{PASSWORD}}
# Node settings.
node:
# Account settings.
ethereum: *ethereum
# Node trusted endpoint.
endpoint: {{ADMIN_ADDRESS}}@127.0.0.1:15030
benchmarks:
# URL to download benchmark list, use "file://" schema to load file from a filesystem.
url: "{{BENCHMARKS_LIST}}"
# Marketplace polling settings.
marketplace:
# Account settings.
ethereum: *ethereum
# DWH endpoint.
endpoint: "{{DWH_ENDPOINT}}"
# Interval of current orders caching, that are fetched from the marketplace.
interval: 30s
# Minimum price threshold for fetching orders from the marketplace.
# Used to prevent regression poisoning.
# Optional.
min_price: 0.003 USD/h
# Optimization engine settings.
optimization: &optimization
# Since v0.4.6 Optimus contains all models with predefined well-tuned
# settings.
# However it is possible to override them. All of them have default
# values specified in this config example.
# The main thing here is the "model". It must have "type" field and
# model-specific settings.
# Currently we support the following models: batch, greedy, genetic
# and branch_bound.
model:
# Batch model combines several other models to be able to run them
# simultaneously and select the most profitable optimization result.
# By default the following logic happens: if the matched orders count
# is small enough the branch_bound algorithm is activated, which gives
# the optimal solution.
type: batch
# Brute force model activation settings.
brute:
# Number of matched orders to activate the following model.
# Must be small enough, because brute force models may consume all CPUs
# on the machine.
match: 8
# Model settings.
model:
# Branch and bound model.
type: branch_bound
# Maximum tree height. After reaching the specified value the model
# returns the best it found.
height_limit: 6
models:
# Greedy algorithm is a fast and simple optimization heuristic, that
# can find solution, but possibly not the optimum.
# We use linear regression to reduce the number of dimensions, which is
# the number of benchmarks, to a single one to be able to apply greedy
# technique.
- type: greedy
# Orders with weight lesser than the specified will be ignored.
weight_limit: 1e-3
# Stop trying to pack sorted-by-weight orders after reaching the
# specified value.
exhaustion_limit: 128
# Regression type.
# Currently supported regressions: linear least squares (lls) and
# non-negative least squares (nnls).
regression:
# Linear least squares regression.
type: lls
# Specific gradient descent options.
# Alpha is the learning rate.
# If the learning rate alpha is too small we will have slow
# convergence.
# If alpha is too large J of theta may not decrease on every
# iteration and may not converge.
alpha: 1e-6
# Regularization term.
regularization: 6.0
# Maximum number of iterations.
max_iterations: 1000
- type: greedy
# Orders with weight lesser than the specified will be ignored.
weight_limit: 1e-3
# Stop trying to pack sorted-by-weight orders after reaching the
# specified value.
exhaustion_limit: 128
# Regression type.
# Currently supported regressions: linear least squares (lls) and
# non-negative least squares (nnls).
regression:
# Linear non-negative least squares regression.
type: nnls
# Genetic algorithm is a meta-heuristic that tries to optimize the
# worker's knapsack using analogy with biological processes.
- type: genetic
# Packed genome starts with populations with randomly picked orders.
genome: packed
# Size of the population. Large populations increases the probability
# of more optimized solution, but consumes more CPU.
population_size: 256
# Maximum number of population generations, after reaching those
# evolution process is stopped.
max_generations: 128
# Maximum algorithm work time.
# If reached, the best attempt is selected.
max_age: 5m
- type: genetic
# Decision genome starts with populations with no orders selected.
genome: decision
# Size of the population. Large populations increases the probability
# of more optimized solution, but consumes more CPU.
population_size: 512
# Maximum number of population generations, after reaching those
# evolution process is stopped.
max_generations: 64
# Maximum algorithm work time.
# If reached, the best attempt is selected.
max_age: 5m
# Map of workers this bot manages defined by its trusted endpoints with their
# settings.
workers:
# Use worker ETH address here, but the account used must have the proper
# access.
{{WORKER_ADDRESS}}@127.0.0.1:15010:
# Account settings.
ethereum: *ethereum
# Epoch is an interval of scanning worker's free resources and selling them
# by cutting ask plans.
# Also this value is used when it's time to replace non-spot deals to
# preliminary calculate whether current ask plans are still profitable.
# Optional.
# Default value is 60s.
epoch: 60s
# How the bot should filter orders. Possible values are: "spot_only".
order_duration_threshold: 72h
# Orders that haven't been sold for this interval will be canceled.
# Optional.
# Default value is 5m.
stale_threshold: 5m
# Each epoch for both spot and nearly-finished deals Optimus tries to
# optimize the next most-profitable ask plan configuration.
# If the new set will gain more profit/hour than the specified value
# some of ask plans will be replaced.
# Zero value is forbidden, because it leads to spot deals being replaced
# each epoch.
# Required.
# Possible dimensions are USD/s, USD/h. May be specified either as absolute
# or relative. For example "0.02 USD/h" would mean that Optimus will
# reassembly all bids if a new combination gives more than "0.02 USD/h"
# profit that the existing one.
# If you want to activate relative threshold in percents, specify "%" after
# the value, for example "2.5%".
price_threshold: 5%
# When activated Optimus will not create ask plans, but continues doing
# the rest calculations instead. Useful for debugging.
# Optional.
# Default value is false.
# dry_run: true
# Identity level specifies which kind of customers this bot allows to work
# with.
# Required.
# Possible values are: anonymous, registered, identified and professional.
identity: anonymous
# Prelude timeout for fetching input properties for the optimization step.
# Used to detect hanging workers and/or DWH.
# Optional.
# Default value is 30s.
prelude_timeout: 30s
# Optimization engine settings.
optimization: *optimization
# Simulation settings.
# When specified Optimus is switched into simulation mode for this worker.
# No orders from the marketplace except specified will be fetched.
# This mode is required mostly for debugging.
#simulation:
# orders: [42, 43]
# Specifies how Optimus will create ask-plans for this worker.
# Possible values: precise, entire_machine.
# The "precise" value means the most precise way to cut and sell the
# machine using various optimization algorithms.
# The "entire_machine" value means that either the most profitable forward
# order will consume the entire machine or the set of spot orders depending
# on the total profitability.
plan_policy: entire_machine