Skip to content

Commit 1555562

Browse files
committed
Remove unused filter_rvs_to_jitter
1 parent 7ccfdaa commit 1555562

File tree

2 files changed

+4
-27
lines changed

2 files changed

+4
-27
lines changed

pymc/initial_point.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,29 +52,11 @@ def convert_str_to_rv_dict(
5252
return initvals
5353

5454

55-
def filter_rvs_to_jitter(step) -> Set[TensorVariable]:
56-
"""Find the set of RVs for which the responsible step methods ask for
57-
the addition of jitter to the initial point.
58-
59-
Parameters
60-
----------
61-
step : BlockedStep or CompoundStep
62-
One or many step methods that were assigned model variables.
63-
64-
Returns
65-
-------
66-
rvs_to_jitter : set
67-
The random variables for which jitter should be added.
68-
"""
69-
# TODO: implement this
70-
return set()
71-
72-
7355
def make_initial_point_fns_per_chain(
7456
*,
7557
model,
7658
overrides: Optional[Union[StartDict, Sequence[Optional[StartDict]]]],
77-
jitter_rvs: Set[TensorVariable],
59+
jitter_rvs: Optional[Set[TensorVariable]] = None,
7860
chains: int,
7961
) -> List[Callable]:
8062
"""Create an initial point function for each chain, as defined by initvals
@@ -87,7 +69,7 @@ def make_initial_point_fns_per_chain(
8769
overrides : optional, list or dict
8870
Initial value strategy overrides that should take precedence over the defaults from the model.
8971
A sequence of None or dicts will be treated as chain-wise strategies and must have the same length as `seeds`.
90-
jitter_rvs : set
72+
jitter_rvs : set, optional
9173
Random variable tensors for which U(-1, 1) jitter shall be applied.
9274
(To the transformed space if applicable.)
9375

pymc/sampling/mcmc.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@
3737
from pymc.backends.base import BaseTrace, MultiTrace, _choose_chains
3838
from pymc.blocking import DictToArrayBijection
3939
from pymc.exceptions import SamplingError
40-
from pymc.initial_point import (
41-
PointType,
42-
StartDict,
43-
filter_rvs_to_jitter,
44-
make_initial_point_fns_per_chain,
45-
)
40+
from pymc.initial_point import PointType, StartDict, make_initial_point_fns_per_chain
4641
from pymc.model import Model, modelcontext
4742
from pymc.sampling.parallel import Draw, _cpu_count
4843
from pymc.sampling.population import _sample_population
@@ -476,7 +471,7 @@ def sample(
476471
ipfns = make_initial_point_fns_per_chain(
477472
model=model,
478473
overrides=initvals,
479-
jitter_rvs=filter_rvs_to_jitter(step),
474+
jitter_rvs=set(),
480475
chains=chains,
481476
)
482477
initial_points = [ipfn(seed) for ipfn, seed in zip(ipfns, random_seed_list)]

0 commit comments

Comments
 (0)