From 8dbde46cef02b0818a7ea21ceb7ce12748754108 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 07:29:52 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/elisa/infer/fit.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/elisa/infer/fit.py b/src/elisa/infer/fit.py index 0808b60..ea510dc 100644 --- a/src/elisa/infer/fit.py +++ b/src/elisa/infer/fit.py @@ -996,8 +996,8 @@ def aies( If `chain_method` is set to ``'parallel'``, this is always False after warmup. resume_sample : str, optional - Read the last_state file from a previous run, and then, sampling - will skip the warmup adaptation phase. Finally, it saves last_state, + Read the last_state file from a previous run, and then, sampling + will skip the warmup adaptation phase. Finally, it saves last_state, whether there is a last_state file or not. moves : dict, optional Moves for the sampler. @@ -1044,7 +1044,7 @@ def aies( aies_kwargs['moves'] = moves # warmup at least 10 - warmup = 10 if warmup<10 else warmup + warmup = 10 if warmup < 10 else warmup sampler = MCMC( AIES(**aies_kwargs), @@ -1107,7 +1107,7 @@ def do_mcmc(rng_key): if resume_sample is not None: with open(resume_sample, 'wb') as f: dill.dump(sampler.last_state, f) - + return PosteriorResult(sampler, self._helper, self) def ess( @@ -1157,8 +1157,8 @@ def ess( If `chain_method` is set to ``'parallel'``, this is always False after warmup. resume_sample : str, optional - Read the last_state file from a previous run, and then, sampling - will skip the warmup adaptation phase. Finally, it saves last_state, + Read the last_state file from a previous run, and then, sampling + will skip the warmup adaptation phase. Finally, it saves last_state, whether there is a last_state file or not. moves : dict, optional Moves for the sampler. @@ -1202,7 +1202,7 @@ def ess( ess_kwargs['moves'] = moves # warmup at least 10 - warmup = 10 if warmup<10 else warmup + warmup = 10 if warmup < 10 else warmup sampler = MCMC( ESS(**ess_kwargs), @@ -1300,8 +1300,8 @@ def sa( progress : bool, optional Whether to show progress bar during sampling. The default is True. resume_sample : str, optional - Read the last_state file from a previous run, and then, sampling - will skip the warmup adaptation phase. Finally, it saves last_state, + Read the last_state file from a previous run, and then, sampling + will skip the warmup adaptation phase. Finally, it saves last_state, whether there is a last_state file or not. **sa_kwargs : dict Extra parameters passed to :class:`numpyro.infer.SA`.