From df15fe2ee24e3174ccf6c0bd40f02c150926f32b Mon Sep 17 00:00:00 2001 From: aloctavodia Date: Fri, 22 May 2020 17:30:30 -0300 Subject: [PATCH 1/4] add n_draws and t_sampling report to smc --- pymc3/smc/sample_smc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pymc3/smc/sample_smc.py b/pymc3/smc/sample_smc.py index 28bfa035ae..c5e22902ca 100644 --- a/pymc3/smc/sample_smc.py +++ b/pymc3/smc/sample_smc.py @@ -12,8 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from .smc import SMC +import time import logging +from .smc import SMC def sample_smc( @@ -144,6 +145,7 @@ def sample_smc( random_seed=random_seed, ) + t1 = time.time() _log = logging.getLogger("pymc3") _log.info("Sample initial stage: ...") stage = 0 @@ -170,5 +172,6 @@ def sample_smc( smc.pool.join() trace = smc.posterior_to_trace() - + trace.report._n_draws = smc.draws + trace.report._t_sampling = time.time() - t1 return trace From e79c039be81b4dd89416d88079c89d02e24b8910 Mon Sep 17 00:00:00 2001 From: aloctavodia Date: Sat, 23 May 2020 18:31:40 -0300 Subject: [PATCH 2/4] add _n_tune --- pymc3/smc/sample_smc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pymc3/smc/sample_smc.py b/pymc3/smc/sample_smc.py index c5e22902ca..8538b25ca4 100644 --- a/pymc3/smc/sample_smc.py +++ b/pymc3/smc/sample_smc.py @@ -173,5 +173,6 @@ def sample_smc( trace = smc.posterior_to_trace() trace.report._n_draws = smc.draws + trace.report._n_tune = 0 trace.report._t_sampling = time.time() - t1 return trace From 32ef08b28743f89d57eb541fe701dd8dfff05bcb Mon Sep 17 00:00:00 2001 From: aloctavodia Date: Sat, 23 May 2020 20:12:11 -0300 Subject: [PATCH 3/4] update release notes --- RELEASE-NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 5b2824d882..d6c784fa6a 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -16,6 +16,7 @@ - `pm.LKJCholeskyCov` now automatically computes and returns the unpacked Cholesky decomposition, the correlations and the standard deviations of the covariance matrix (see [#3881](https://github.com/pymc-devs/pymc3/pull/3881)). - `pm.Data` container can now be used for index variables, i.e with integer data and not only floats (issue [#3813](https://github.com/pymc-devs/pymc3/issues/3813), fixed by [#3925](https://github.com/pymc-devs/pymc3/pull/3925)). - `pm.Data` container can now be used as input for other random variables (issue [#3842](https://github.com/pymc-devs/pymc3/issues/3842), fixed by [#3925](https://github.com/pymc-devs/pymc3/pull/3925)). +- Add `SamplerReport` with properties `n_draws`, `t_sampling` and `n_tune` to SMC. `n_tune` is always 0 [#3931](https://github.com/pymc-devs/pymc3/issues/3931). ### Maintenance - Tuning results no longer leak into sequentially sampled `Metropolis` chains (see #3733 and #3796). From 5a4dc4cda0b7aed16996309604e6176b1a6e954e Mon Sep 17 00:00:00 2001 From: aloctavodia Date: Sun, 24 May 2020 09:09:04 -0300 Subject: [PATCH 4/4] resolve conflicts --- RELEASE-NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index d6c784fa6a..fb1c5b4bb4 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -16,6 +16,7 @@ - `pm.LKJCholeskyCov` now automatically computes and returns the unpacked Cholesky decomposition, the correlations and the standard deviations of the covariance matrix (see [#3881](https://github.com/pymc-devs/pymc3/pull/3881)). - `pm.Data` container can now be used for index variables, i.e with integer data and not only floats (issue [#3813](https://github.com/pymc-devs/pymc3/issues/3813), fixed by [#3925](https://github.com/pymc-devs/pymc3/pull/3925)). - `pm.Data` container can now be used as input for other random variables (issue [#3842](https://github.com/pymc-devs/pymc3/issues/3842), fixed by [#3925](https://github.com/pymc-devs/pymc3/pull/3925)). +- Plots and Stats API sections now link to ArviZ documentation [#3927](https://github.com/pymc-devs/pymc3/pull/3927) - Add `SamplerReport` with properties `n_draws`, `t_sampling` and `n_tune` to SMC. `n_tune` is always 0 [#3931](https://github.com/pymc-devs/pymc3/issues/3931). ### Maintenance