-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfig.yaml
107 lines (105 loc) · 3.73 KB
/
config.yaml
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
problem:
# Problem name to prefix output files with
name: KU
# The base OpenFOAM case; this needs to be fully functional case once paramters/files are substituted.
template_case: 'pitzDaily'
# Run type: 'optimization' or 'parameter_variation'
type: 'optimization'
# Generation models; Either auto or an ordered list of models
models: auto
# Experiment paramters
parameters:
k:
type: range
value_type: float
bounds: [0.1, 0.4]
log_scale: False
inletVelocity:
type: range
value_type: float
bounds: [5.0, 20.0]
log_scale: False
# Paramters can be substitued as whole case files
# There are done first if present
#file_copies:
#modelType:
# template: "/constant/transportProperties"
# Parameters can also be substituted per-file
scopes:
"/0orig/U":
inletVelocity: "inletVelocity"
"/0orig/k":
k: "k"
# Experiment objectives. Metric values are fetched through shell commands in the working directory of
# the specific trial
objectives:
ExecutionTime:
mode: 'shell'
# A little (optional) preparation before metrics are evaluated
# This command needs to be !interactive! as it runs in blocking mode and it's only active in SLURM metric value mode
# Think: salloc
prepare: ['echo', '$CASE_NAME']
# How to evaluate the objective metric?
# This command needs to return a convertible-to-float value
command: ['awk', '/ExecutionTime/{a=$3} END{print(a)}', 'log.simpleFoam']
threshold: 5
minimize: True
lower_is_better: True
ContinuityErrors:
mode: 'shell'
command: ['awk', 'function abs(v) {return v < 0 ? -v : v} /continuity errors/{a=$15} END{print(abs(a))}', 'log.simpleFoam']
threshold: 1.0
minimize: True
lower_is_better: True
meta:
# When clonging template case, specify extra files/dirs to clone
case_subdirs_to_clone: ["0orig"]
# Where to clone trial cases (absolute path, leave empty to consider $PWD)
clone_destination: "./trials/"
# Case run mode (local, slurm)
case_run_mode: local
# How should we run your case?
# Metric values are extracted through problem.objectives.*.command
# after completion of the following command
# The command is processed to provide a couple of variables:
# - $CASE_PATH: fullpath to **parameter variation case**
# - $CASE_NAME: generated name of the **parameter variation case**
case_run_command: ['./Allrun', '/usr/lib/openfoam/openfoam2112']
# Number of trials to generate:
# Using SOBOL for paramter variation
# Model is automatically chosen for optimization studies
n_trials: 10
# Number of trials to deploy at the same time (in parallel)
n_parallel_trials: 3
# Time To Live for a single trial in seconds
ttl_trial: 3600
# Number of seconds to wait for polling initially
init_poll_wait: 2
# Rate at which poll interval increases
poll_factor: 1.5
# Timeout in hours for the whole experiment
timeout: 10
# Try to use SAASBO, default is to use: GPEI
use_saasbo: True
# Number of pareto front points to generate
n_pareto_points: 5
# When to stop the optimization
stopping_strategy:
# If the probablity of improvement falls under this value, stop
improvement_bar: 1e-4
# Minimal trials before considering the stopping strategy
min_trials: 300
# How many trials to consider for computing the improvement probability
window_size: 10
visualize:
# How often to update foamDash graphs
update_interval: 15
# How many latest trials to generate pictures of
n_figures: 3
# A threshold zscore to filter outliers if some trials get penalized
zscore_bar: 15
figure_generator: ['echo', 'null']
graph_height: 400
# Interface settings for Dash
host: '0.0.0.0'
port: 8888