|
QDpy
|
Grow and refine a categorical archive for one fixed question and context. More...
Public Member Functions | |
| entries (self) | |
| stats (self) | |
| run (self, edit, assess, *, budget, refinement_reserve=0) | |
| Bootstrap from the source, fill empty cells, then improve occupied cells. | |
| probe (self, predict, *, group=None, limit=None) | |
| Measure disagreement on retained rewrites without consulting the gold answer. | |
Grow and refine a categorical archive for one fixed question and context.
Use a staged targeted scheduler with caller-defined rewrite strategies and checks.
:param context: Original context. Bind the question and answer specification
to the editor and validator callbacks.
:param edits: Ordered nonempty labels for the edit axis.
:param support: Ordered nonempty labels for the support axis. The first
label is the default bootstrap target.
:param inherit_support: Edit labels that require a parent in the target
support level. The default uses insertion and reordering labels.
:param bootstrap: Ordered cells to attempt from the original context.
:param target_attempts: Maximum attempts to fill each cell during coverage.
:param coverage_patience: End coverage after this many attempts with no new cell.
:param seed: Seed for ties in target selection.
Definition at line 68 of file neighborhood_elites.py.
| qdpy.algorithms.neighborhood_elites.NeighborhoodElites.entries | ( | self | ) |
Return one immutable elite per occupied cell in axis order.
Definition at line 109 of file neighborhood_elites.py.
| qdpy.algorithms.neighborhood_elites.NeighborhoodElites.probe | ( | self, | |
| predict, | |||
| * | , | ||
| group = None, | |||
| limit = None ) |
Measure disagreement on retained rewrites without consulting the gold answer.
Call predict once per selected text and group answers by a hashable key. The default groups exact answer strings. Pass a normalizer or a semantic class callback for equivalent answers. When limited, query the highest-quality elites first. Empty neighborhoods have undefined entropy.
Definition at line 185 of file neighborhood_elites.py.
| qdpy.algorithms.neighborhood_elites.NeighborhoodElites.run | ( | self, | |
| edit, | |||
| assess, | |||
| * | , | ||
| budget, | |||
| refinement_reserve = 0 ) |
Bootstrap from the source, fill empty cells, then improve occupied cells.
Spend up to budget editor calls. Leave unused work if no action is possible.
:param edit: Callback (parent_context, target_cell, rng) returning text or None.
:param assess: Callback (parent_context, rewrite, target_cell) returning
(realized_cell, quality), or None when answer preservation or edit
verification fails. Use the same original answer specification throughout.
:param budget: Maximum additional editor calls, including rejected edits.
:param refinement_reserve: Portion of budget reserved for occupied cells.
Definition at line 141 of file neighborhood_elites.py.
| qdpy.algorithms.neighborhood_elites.NeighborhoodElites.stats | ( | self | ) |
Return cumulative construction and answer call counts.
Definition at line 114 of file neighborhood_elites.py.