MCMC tasks that start from other MCMC tasks need to "steal" or inherit parameters from their starter tasks. For instance, a SpectroTask starting from an HMCTask should steal Ns, Nt, kappa to run, as well as any parameters it needs to generate its output filename.
Currently, MCMC parameter inheritance is based on an "inherit by default" scheme: unless an attribute is provided in a list (two lists, in practice), the attribute will be stolen from the parent and written in to the inheriting MCMC task as an attribute. This is dangerous and fails insidiously.
Instead, switch to a scheme where the parameters to inherit must be specified in a list in the class variables, e.g.,
where the list has been artificially separated here to illustrate which parameters are physical and which are needed to generate the filename.
It may be more useful for inherit_params to be specified as a dictionary to rename inherited params. For example,
class FundamentalSpectroTask(ConfigMeasurement):
inherit_params = {'k4' : 'kappa', ...}
MCMC tasks that start from other MCMC tasks need to "steal" or inherit parameters from their starter tasks. For instance, a
SpectroTask
starting from anHMCTask
should stealNs
,Nt
,kappa
to run, as well as any parameters it needs to generate its output filename.Currently, MCMC parameter inheritance is based on an "inherit by default" scheme: unless an attribute is provided in a list (two lists, in practice), the attribute will be stolen from the parent and written in to the inheriting MCMC task as an attribute. This is dangerous and fails insidiously.
Instead, switch to a scheme where the parameters to inherit must be specified in a list in the class variables, e.g.,
where the list has been artificially separated here to illustrate which parameters are physical and which are needed to generate the filename. It may be more useful for
inherit_params
to be specified as a dictionary to rename inherited params. For example,