Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rename_dict on io_pymc3.py converter to follow schema convention #1555

Merged
merged 7 commits into from Feb 14, 2021
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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([1555](https://github.com/arviz-devs/arviz/pull/1555))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add from_pymc3 to the point above about schema convention? I think it will be more concise and easy to read

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OriolAbril Sir, Changed the log. Please let me know if there is anything else to update.Thank you


### Deprecation
* Removed Geweke diagnostic ([1545](https://github.com/arviz-devs/arviz/pull/1545))
Expand Down
7 changes: 6 additions & 1 deletion arviz/data/io_pymc3.py
Expand Up @@ -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:
Expand Down