Commit 560dd832 authored by Gregory Ashton's avatar Gregory Ashton

Fix cached running for emcee

- Also adds ability pass through the 'a' parameter used by emcee
parent 4b558209
......@@ -755,15 +755,16 @@ class Emcee(Sampler):
""" https://github.com/dfm/emcee """
def _run_external_sampler(self):
self.nwalkers = self.kwargs.pop('nwalkers', 100)
self.nsteps = self.kwargs.pop('nsteps', 100)
self.nburn = self.kwargs.pop('nburn', 50)
self.nwalkers = self.kwargs.get('nwalkers', 100)
self.nsteps = self.kwargs.get('nsteps', 100)
self.nburn = self.kwargs.get('nburn', 50)
a = self.kwargs.get('a', 2)
emcee = self.external_sampler
tqdm = utils.get_progress_bar(self.kwargs.pop('tqdm', 'tqdm'))
sampler = emcee.EnsembleSampler(
nwalkers=self.nwalkers, dim=self.ndim, lnpostfn=self.lnpostfn,
**self.kwargs)
a=a)
pos0 = [self.get_random_draw_from_prior() for i in range(self.nwalkers)]
for result in tqdm(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment