Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Release Notes

## PyMC 3.4 (unreleased)

## PyMC 3.5 (Unreleaased)


### Fixes

- Fixed `KeyError` raised when only subset of variables are specified to be recorded in the trace.

## PyMC 3.4.1 (April 18 2018)

### New features

Expand Down
3 changes: 2 additions & 1 deletion pymc3/backends/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def _run_convergence_checks(self, trace, model):
if is_transformed_name(rv_name):
rv_name2 = get_untransformed_name(rv_name)
rv_name = rv_name2 if rv_name2 in valid_name else rv_name
varnames.append(rv_name)
if rv_name in trace.varnames:
varnames.append(rv_name)

self._effective_n = effective_n = diagnostics.effective_n(trace, varnames)
self._gelman_rubin = gelman_rubin = diagnostics.gelman_rubin(trace, varnames)
Expand Down
5 changes: 5 additions & 0 deletions pymc3/tests/test_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ def test_empty_model():
pm.sample()
error.match('any free variables')

def test_partial_trace_sample():
with pm.Model() as model:
a = pm.Normal('a', mu=0, sd=1)
b = pm.Normal('b', mu=0, sd=1)
trace = pm.sample(trace=[a])

@pytest.mark.xfail(condition=(theano.config.floatX == "float32"), reason="Fails on float32")
class TestNamedSampling(SeededTest):
Expand Down