|
QDpy
|
Rank Density Descent Search candidates with a continuous normalizing flow. More...
Go to the source code of this file.
Classes | |
| class | qdpy.algorithms.density_flow.DDSCNFResult |
| DDS accounting with separate model training and density prediction counts. More... | |
| class | qdpy.algorithms.density_flow._FlowDensity |
Namespaces | |
| namespace | qdpy |
Functions | |
| qdpy.algorithms.density_flow._log_density (torch, network, points, integration_steps) | |
| qdpy.algorithms.density_flow.dds_cnf (archive, evaluate, *, x0, budget, reservoir_size=1024, sigma0=.15, batch_size=16, ind_domain=(0., 1.), seed=0, executor=None, on_step=None, model_width=32, fit_period=4, fit_steps=20, fit_batch_size=32, integration_steps=8, learning_rate=.003) | |
| Use a flow-matched continuous density in the standard CMA-based DDS loop. | |
Rank Density Descent Search candidates with a continuous normalizing flow.
Definition in file density_flow.py.
|
protected |
Integrate descriptors and the exact change-of-variables trace backward.
Definition at line 32 of file density_flow.py.
| qdpy.algorithms.density_flow.dds_cnf | ( | archive, | |
| evaluate, | |||
| * | , | ||
| x0, | |||
| budget, | |||
| reservoir_size = 1024, | |||
| sigma0 = .15, | |||
| batch_size = 16, | |||
| ind_domain = (0., 1.), | |||
| seed = 0, | |||
| executor = None, | |||
| on_step = None, | |||
| model_width = 32, | |||
| fit_period = 4, | |||
| fit_steps = 20, | |||
| fit_batch_size = 32, | |||
| integration_steps = 8, | |||
| learning_rate = .003 ) |
Use a flow-matched continuous density in the standard CMA-based DDS loop.
| archive | Empty parentless best-only Grid or CVTGrid used for reporting. |
| evaluate | Callable (genome) returning singleton fitness and a descriptor vector. |
| x0 | Initial CMA mean. |
| budget | Total attempted evaluations, including failures. |
| reservoir_size | Number of previous measurements retained for the density model. |
| sigma0 | CMA sampling scale. |
| batch_size | Candidate batch size. |
| ind_domain | Shared genome bounds, or None for unbounded search. |
| seed | Private search and flow seed. |
| executor | Optional ordered map executor for evaluations. |
| on_step | Optional callback receiving archive, iteration, and evaluation count. |
| model_width | Width of the two hidden layers. |
| fit_period | Batches between model updates. |
| fit_steps | Adam updates at each refit. |
| fit_batch_size | Descriptor samples per Adam update. |
| integration_steps | Midpoint integration steps per density calculation. |
| learning_rate | Flow Adam learning rate. |
Run DDS with a CPU PyTorch flow trained by conditional flow matching. Fit only on earlier descriptor batches. Score a candidate by mapping its descriptor back to a standard Gaussian and integrating the velocity divergence. A fixed affine normalization is learned from the first nonempty reservoir. Its log determinant cancels in the ranking. Fitness still controls only admission to the reporting archive. Requires pycma and PyTorch, available through the existing ``dms`` extra.
Definition at line 153 of file density_flow.py.