Source code for tuners.dpg_tuner
from .cdpg_tuner import CDPGTuner
from disco.distributions.single_context_distribution import SingleContextDistribution
[docs]class DPGTuner(CDPGTuner):
"""
DPG tuning class,
a specific case of CDPG with a single, fixed, context.
"""
def __init__(self, *args, context="", **kwargs):
"""
Parameters
----------
context: text
a single textual sequence to contextualize the sampling from the proposal
"""
super(DPGTuner, self).__init__(
*args,
context_distribution=SingleContextDistribution(context),
context_sampling_size=1,
**kwargs
)