Closed segasai closed 2 years ago
Back when I was setting this up I probably had a reason, but I can't really remember why at the moment...
Ok, I will aim to change that then, as I think it makes more sense and now with the restoring/saving it is becoming important for the main DynamicNestedSampler and NestedSampler to be classes as opposed to functions returning some other classes.
I think I can see the problem.
With dynamic sampler it's an easy natural change https://github.com/joshspeagle/dynesty/commit/1d41ca314acb9f9505a90e5bfe5710e4b4eeabc0
But the problem with the static samplers is that they (EllipsoodalSampler etc ) all inherit from SuperSampler class. And then NestedSampler() returns either of these.
I need to think if there is an restructuring with inheritance/interface that would work for the static case
Is there a reason why DynamicNestedSampler is a function as opposed to a class inheriting from from DynamicSampler @joshspeagle ? like this
without that it's hard to have a restore method for the checkpointing patch. I.e.
dns= DynamicNestedSampler.restore('xx.pkl')
or something like that.