Run Parameters¶
Every value that controls a survey is a field of one of these two classes, one
key of the plan file, and one command-line flag. The command-line surface is
generated from dataclasses.fields(), so a new field reaches all three places.
ArchiveParams holds the values with the same meaning on every backend.
GpuParams holds the values only a device backend can use. The two stay
separate so that a device value on a host run is an error and not a setting with
no effect.
A caller gives ordered override layers to resolve: the backend capability
defaults, then the plan file, then the command-line flags. A later layer wins.
ArchiveParams
dataclass
¶
Survey parameters with the same meaning on every backend.
Attributes:
| Name | Type | Description |
|---|---|---|
cell |
float
|
Niche side in barycentric units. The grid is unbounded. |
origin |
float
|
Grid origin on both axes. |
n_iters |
int
|
The survey budget cap in variations. |
seed |
int
|
RNG seed. |
sigma_slide, scale_width |
float
|
Proposal widths for the branch moves. |
logl_margin |
(float, optional)
|
Relative log-likelihood gate as a fixed number of nats below the best
tree found. None leaves the gate to |
logl_margin_coeff |
(float, optional)
|
Relative log-likelihood gate as this coefficient times the square root
of the site count, used when |
logl_floor |
(float, optional)
|
Absolute log-likelihood gate. Not permitted together with
|
converge |
bool
|
Halt on discovery saturation when set. |
force_full_run |
bool
|
Run the full budget and ignore the halt. |
gate_window |
int
|
Trailing window in checkpoints for the halt rates. |
coverage_eps, precision_eps |
float
|
Halt thresholds on the windowed coverage and precision rates. |
checkpoint_every |
int
|
Variations between two checkpoints. This sets the halt granularity and the monitor resolution on both engines. |
n_walkers |
int
|
Parents drawn per pass. The GPU runs the walkers in parallel. The CPU runs them in a loop. |
walk_steps |
int
|
Moves each walker makes per pass. Each move writes one candidate. |
Source code in src/hifuku/params.py
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 | |
passes_per_checkpoint
property
¶
Passes that run between two checkpoints.
A backend submits this many passes and then lets the driver read the statistics. The count is 1 or more, so a checkpoint cadence smaller than one pass still makes progress.
resolve
classmethod
¶
Build the parameters from ordered override layers.
A later layer wins over an earlier one. Give the layers in this order:
the backend capability defaults, the plan file, then the command-line
flags. An unknown field name raises ValueError.
Source code in src/hifuku/params.py
GpuParams
dataclass
¶
Survey parameters that only a device backend can use.
Attributes:
| Name | Type | Description |
|---|---|---|
extent |
float
|
Half-extent of the device niche allocation. This is a memory bound and not a limit on the chart domain. |
Source code in src/hifuku/params.py
resolve
classmethod
¶
Build the parameters from ordered override layers.
A later layer wins over an earlier one. An unknown field name raises
ValueError.