pymc-devs / pymc4

(Deprecated) Experimental PyMC interface for TensorFlow Probability. Official work on this project has been discontinued.
Apache License 2.0
711 stars 113 forks source link

Revert #271. Distributions now use their conditions attribute instead of _distribution #302

Closed lucianopaz closed 4 years ago

lucianopaz commented 4 years ago

Closes #299.

This PR basically reverts #271. The problem was that the tfp meta distributions: Sample, Independent and BatchStacker would get in the way of the raw underlying Distribution, and block direct access to its parameters such as low and high values.

By the way, I was checking the tests locally and came across several broken doctests. I thought that we were testing those in our CI pipes, but it looks like we aren't. @tirthasheshpatel, could you try to run pytest -v pymc4 --doctest-modules and take a look at the error that is popping out from gp.LatentGP.conditional and gp.LatentGP.prior? I fixed everything else but wasn't able to see the what was wrong with those.

codecov[bot] commented 4 years ago

Codecov Report

Merging #302 into master will not change coverage. The diff coverage is 90.90%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #302   +/-   ##
=======================================
  Coverage   89.63%   89.63%           
=======================================
  Files          32       32           
  Lines        2403     2403           
=======================================
  Hits         2154     2154           
  Misses        249      249           
Impacted Files Coverage Δ
pymc4/distributions/timeseries.py 100.00% <ø> (ø)
pymc4/distributions/continuous.py 98.24% <80.00%> (ø)
pymc4/distributions/discrete.py 97.95% <100.00%> (ø)
tirthasheshpatel commented 4 years ago

Sure @lucianopaz! I will make a PR for that asap.