Skip to content

Commit

Permalink
Remove ABC named model restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed Jul 26, 2021
1 parent 4d5cd13 commit 62bd386
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
5 changes: 0 additions & 5 deletions pymc3/smc/sample_smc.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,6 @@ def sample_smc(
_log.info("Initializing SMC sampler...")

model = modelcontext(model)
if model.name:
raise NotImplementedError(
"The SMC implementation currently does not support named models. "
"See https://github.com/pymc-devs/pymc3/pull/4365."
)
if cores is None:
cores = _cpu_count()

Expand Down
10 changes: 0 additions & 10 deletions pymc3/tests/test_smc.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,16 +474,6 @@ def test_name_is_string_type(self):
trace = pm.sample_smc(draws=10, cores=1, return_inferencedata=False)
assert isinstance(trace._straces[0].name, str)

def test_named_models_are_unsupported(self):
with pm.Model(name="NamedModel"):
a = pm.Normal("a", mu=0, sigma=1)
b = pm.HalfNormal("b", sigma=1)
s = pm.Simulator("s", NormalSimRV1(), a, b, observed=self.data)

# TODO: Why is this?
with pytest.raises(NotImplementedError, match="named models"):
pm.sample_smc(draws=10, chains=1)

def test_deprecated_abc_args(self):
with self.SMABC_test:
with pytest.warns(
Expand Down

0 comments on commit 62bd386

Please sign in to comment.