|
QDpy
|
Train one encoder per grid and rebuild all learned archives together. More...
Public Member Functions | |
| attach (self, algorithm) | |
| Register scheduled retraining at iteration and final evaluation boundaries. | |
| __setstate__ (self, state) | |
| Restore the depot link when loading a saved coordinator. | |
| MCAuroraTraining|None | retrain_if_needed (self) |
| Fit once if the depot has crossed the next training threshold. | |
| MCAuroraTraining | fit (self) |
| Fit model copies and stage every grid before installing the new descriptors. | |
Protected Member Functions | |
| _on_iteration (self, _algorithm, _elapsed) | |
| Check depot growth at an optimiser event. | |
| _stage_grid (self, archive, model, sample_tensor, records) | |
| Encode with a candidate model and prepare a replacement grid. | |
| _train (self, models, data) | |
| Optimise the joint objective and average last-epoch batch losses. | |
Train one encoder per grid and rebuild all learned archives together.
Coordinate a multi-container AURORA search on a shared observation depot.
Pass distinct, initially empty fixed grids and a separate training
container. Each wrapped grid forwards evaluated candidates to the
depot, including local rejects. Use ``archives`` as the containers of
ordinary ask/tell optimisers, for example with an alternating wrapper.
The coordinator keeps training and archive updates on the calling
thread. Evaluation workers only need to return fitness and observations.
:param grids: Fixed :class:`~qdpy.containers.Grid` instances to wrap.
:param training_container: Shared archive of evaluated observations.
:param base_scores: Ordered scalar score names to encode.
:param observation_score: Name of one fixed-shape numeric observation.
:param models: Optional autoencoder per grid, with encoder and decoder.
The default is a dense autoencoder with a tanh output.
:param training_period: Depot growth between scheduled refits.
A value of zero enables manual training only.
:param epochs: Training epochs per refit.
:param batch_size: Target training batch size.
:param learning_rate: Adam learning rate.
:param quantile_transform: Map latent coordinates into the unit interval.
:param diversity: One of ``none``, ``outputs``, ``covariance``, or ``correlation``.
:param diversity_weight: Weight subtracted times the diversity reward.
A positive weight penalises off-diagonal covariance.
:param rebuild_from: Reinsert the full ``depot`` into all grids or rebuild
from each grid's own ``elites``. An empty grid starts from the depot
on the first refit in either mode.
:param max_training_samples: Optional cap on records used per refit.
All rebuild records are encoded even when training uses a sample.
:param seed: Seed for model creation, training and depot sampling.
Seed the search RNG and any stochastic evaluator separately.
Definition at line 130 of file mc_aurora.py.
| qdpy.containers.mc_aurora.MCAurora.__setstate__ | ( | self, | |
| state ) |
Restore the depot link when loading a saved coordinator.
Individual grid snapshots can omit parent references. The coordinator has its own reference to the training data.
Definition at line 249 of file mc_aurora.py.
|
protected |
Encode with a candidate model and prepare a replacement grid.
Stage readmission without forwarding to parents and retain references to the original candidates. The live grid is untouched.
Definition at line 272 of file mc_aurora.py.
| qdpy.containers.mc_aurora.MCAurora.attach | ( | self, | |
| algorithm ) |
Register scheduled retraining at iteration and final evaluation boundaries.
| algorithm | Optimiser driving search, typically an AlternatingAlgWrapper. |
Register joint retraining after iterations and the final partial batch.
Definition at line 241 of file mc_aurora.py.
| MCAuroraTraining qdpy.containers.mc_aurora.MCAurora.fit | ( | self | ) |
Fit model copies and stage every grid before installing the new descriptors.
| ValueError | If fewer than two records are available. |
| FloatingPointError | If the training objective is nonfinite. |
Train the full ensemble from the current depot and rebuild its grids. The live models, grids and training history are installed only after training, encoding and staged readmission succeed for every grid. Train and call ask/tell serially on the coordinator.
Definition at line 298 of file mc_aurora.py.
| MCAuroraTraining | None qdpy.containers.mc_aurora.MCAurora.retrain_if_needed | ( | self | ) |
Fit once if the depot has crossed the next training threshold.
Train when the depot crosses a new multiple of the training period.
Definition at line 260 of file mc_aurora.py.