From d5730715cc5f3d8a421f7f9a2e4097ad408fdb48 Mon Sep 17 00:00:00 2001 From: madhu charan <62477860+madhucharan@users.noreply.github.com> Date: Fri, 12 Feb 2021 23:13:53 +0530 Subject: [PATCH 1/6] Update rename_dict on io_pymc3.py converter to follow schema convention --- arviz/data/io_pymc3.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arviz/data/io_pymc3.py b/arviz/data/io_pymc3.py index 862e3128f9..1bdc966ee0 100644 --- a/arviz/data/io_pymc3.py +++ b/arviz/data/io_pymc3.py @@ -274,7 +274,12 @@ def posterior_to_xarray(self): def sample_stats_to_xarray(self): """Extract sample_stats from PyMC3 trace.""" data = {} - rename_key = {"model_logp": "lp"} + rename_key = { + "model_logp": "lp", + "mean_tree_accept": "acceptance_rate", + "depth": "tree_depth", + "tree_size": "n_steps", + } data = {} data_warmup = {} for stat in self.trace.stat_names: From 1ce90a9bd4bdef0fb58f9f2b1dddd1d7e0c4f2d8 Mon Sep 17 00:00:00 2001 From: madhu charan <62477860+madhucharan@users.noreply.github.com> Date: Fri, 12 Feb 2021 23:13:53 +0530 Subject: [PATCH 2/6] Updated `io_pymc3.py` rename dict to follow schema convention --- arviz/data/io_pymc3.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arviz/data/io_pymc3.py b/arviz/data/io_pymc3.py index 862e3128f9..1bdc966ee0 100644 --- a/arviz/data/io_pymc3.py +++ b/arviz/data/io_pymc3.py @@ -274,7 +274,12 @@ def posterior_to_xarray(self): def sample_stats_to_xarray(self): """Extract sample_stats from PyMC3 trace.""" data = {} - rename_key = {"model_logp": "lp"} + rename_key = { + "model_logp": "lp", + "mean_tree_accept": "acceptance_rate", + "depth": "tree_depth", + "tree_size": "n_steps", + } data = {} data_warmup = {} for stat in self.trace.stat_names: From 2047ed5ac69e30b75442d2d8c6fd439261954cea Mon Sep 17 00:00:00 2001 From: madhu charan <62477860+madhucharan@users.noreply.github.com> Date: Fri, 12 Feb 2021 23:51:04 +0530 Subject: [PATCH 3/6] Update `io_pymc3.py` rename dict to follow schema convention and update changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a41456f2e5..705a98ce26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Maintenance and fixes * Updated `from_cmdstan` and `from_numpyro` converter to follow schema convention ([1541](https://github.com/arviz-devs/arviz/pull/1541) and [1525](https://github.com/arviz-devs/arviz/pull/1525)) * Fix calculation of mode as point estimate ([1552](https://github.com/arviz-devs/arviz/pull/1552)) +* Updated `io_pymc3.py` rename dict to follow schema convention ### Deprecation * Removed Geweke diagnostic ([1545](https://github.com/arviz-devs/arviz/pull/1545)) From 5d0bd2d7e460a0a77ef09d659fd9c03e5f627a4a Mon Sep 17 00:00:00 2001 From: madhu charan <62477860+madhucharan@users.noreply.github.com> Date: Sat, 13 Feb 2021 00:22:09 +0530 Subject: [PATCH 4/6] update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 705a98ce26..8c40a06514 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ ### Maintenance and fixes * Updated `from_cmdstan` and `from_numpyro` converter to follow schema convention ([1541](https://github.com/arviz-devs/arviz/pull/1541) and [1525](https://github.com/arviz-devs/arviz/pull/1525)) * Fix calculation of mode as point estimate ([1552](https://github.com/arviz-devs/arviz/pull/1552)) -* Updated `io_pymc3.py` rename dict to follow schema convention +* Updated `io_pymc3.py` rename dict to follow schema convention([1555](https://github.com/arviz-devs/arviz/pull/1555)) ### Deprecation * Removed Geweke diagnostic ([1545](https://github.com/arviz-devs/arviz/pull/1545)) From 1467079da5d478920f2b56cac720da265f1d52db Mon Sep 17 00:00:00 2001 From: madhu charan <62477860+madhucharan@users.noreply.github.com> Date: Sat, 13 Feb 2021 10:52:09 +0530 Subject: [PATCH 5/6] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c40a06514..e9ef36ecb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,10 @@ * Added confidence interval band to auto-correlation plot ([1535](https://github.com/arviz-devs/arviz/pull/1535)) ### Maintenance and fixes +* Updated `io_pymc3.py` rename dict to follow schema convention([1555](https://github.com/arviz-devs/arviz/pull/1555)) * Updated `from_cmdstan` and `from_numpyro` converter to follow schema convention ([1541](https://github.com/arviz-devs/arviz/pull/1541) and [1525](https://github.com/arviz-devs/arviz/pull/1525)) * Fix calculation of mode as point estimate ([1552](https://github.com/arviz-devs/arviz/pull/1552)) -* Updated `io_pymc3.py` rename dict to follow schema convention([1555](https://github.com/arviz-devs/arviz/pull/1555)) + ### Deprecation * Removed Geweke diagnostic ([1545](https://github.com/arviz-devs/arviz/pull/1545)) From 91bf068609c8e5ce47b6764d2971b647fb01c540 Mon Sep 17 00:00:00 2001 From: Madhu Charan <62477860+madhucharan@users.noreply.github.com> Date: Sat, 13 Feb 2021 14:35:51 +0530 Subject: [PATCH 6/6] Update Maintenance and Fixes in CHANGELOG.md update Changelog.md to have a single bullet point for schema convention fixes Co-authored-by: Oriol Abril-Pla --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9ef36ecb9..c1cd97fb3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,7 @@ * Added confidence interval band to auto-correlation plot ([1535](https://github.com/arviz-devs/arviz/pull/1535)) ### Maintenance and fixes -* Updated `io_pymc3.py` rename dict to follow schema convention([1555](https://github.com/arviz-devs/arviz/pull/1555)) -* Updated `from_cmdstan` and `from_numpyro` converter to follow schema convention ([1541](https://github.com/arviz-devs/arviz/pull/1541) and [1525](https://github.com/arviz-devs/arviz/pull/1525)) +* Updated `from_cmdstan`, `from_numpyro` and `from_pymc3` converters to follow schema convention ([1541](https://github.com/arviz-devs/arviz/pull/1541), [1525](https://github.com/arviz-devs/arviz/pull/1525) and [1555](https://github.com/arviz-devs/arviz/pull/1555)) * Fix calculation of mode as point estimate ([1552](https://github.com/arviz-devs/arviz/pull/1552))