Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 29, 2024
1 parent 4abbb53 commit 8dbde46
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/elisa/infer/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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`.
Expand Down

0 comments on commit 8dbde46

Please sign in to comment.