From 8bbc9c431f37f8dd29f8bc04db27d7782457922d Mon Sep 17 00:00:00 2001 From: Kaze Wong Date: Fri, 5 Apr 2024 17:16:17 -0400 Subject: [PATCH] Remove local_sampler_tuning method --- src/flowMC/Sampler.py | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/flowMC/Sampler.py b/src/flowMC/Sampler.py index cfd6b68..342d6d2 100644 --- a/src/flowMC/Sampler.py +++ b/src/flowMC/Sampler.py @@ -198,38 +198,6 @@ def sample(self, initial_position: Float[Array, "n_chains n_dim"], data: dict): ) self.summary[strategy.__name__] = summary - def local_sampler_tuning( - self, - initial_position: Float[Array, "n_chain n_dim"], - data: dict, - max_iter: int = 100, - ): - """ - Tuning the local sampler. This runs a number of iterations of the local sampler, - and then uses the acceptance rate to adjust the local sampler parameters. - Since this is mostly for a fast adaptation, we do not carry the sample state forward. - Instead, we only adapt the sampler parameters using the initial position. - - Args: - n_steps (int): Number of steps to run the local sampler. - initial_position (Device Array): Initial position for the local sampler. - max_iter (int): Number of iterations to run the local sampler. - """ - if self.local_autotune: - print("Tuning local sampler") - # kernel_vmap = self.local_sampler.kernel_vmap - # self.local_sampler.params = self.local_autotune( - # kernel_vmap, - # self.rng_keys_mcmc, - # initial_position, - # self.likelihood_vec(initial_position), - # data, - # self.local_sampler.params, - # max_iter, - # ) - else: - print("No autotune found, use input sampler_params") - def get_sampler_state(self, training: bool = False) -> dict: """ Get the sampler state. There are two sets of sampler outputs one can get,