• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pyro-ppl / numpyro / 34692431167
93%

Build:
DEFAULT BRANCH: master
Ran 12 Sep 2026 12:18PM UTC
Jobs 3
Files 86
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Sep 2026 11:58AM UTC coverage: 92.635% (+0.1%) from 92.525%
34692431167

push

github

web-flow
Add TruncatedGamma distributions (#2257)

* Add TruncatedGamma distributions

Add LeftTruncatedGamma, RightTruncatedGamma and TwoSidedTruncatedGamma,
dispatched by TruncatedGamma(concentration, rate, low=, high=), following the
structure outlined in #969. Supersedes the inactive #1187.

The two-sided normalizer switches to the upper-tail form when the interval lies
above the median: the lower-tail difference F(high) - F(low) is exactly zero in
single precision for Gamma(2, 1) on [30, 40]. Adds gammainccinv to
distributions/util.py, wrapping tfp.math.igammacinv.

* Address review: per-order tail switch, bisection icdf, guards

- `_partial_moment` re-decides the tail switch at `concentration + order`.
  Gamma(alpha+k) has a larger median, so an interval above the base median can
  sit deep in the lower tail at the shifted order, where the upper-tail form is
  the one that cancels. Reusing the order-zero branch collapsed the second
  moment to zero and produced a negative variance.
- `icdf` bisects the cdf instead of calling an inverse incomplete gamma, which
  saturates below a tail probability of ~3e-8 and returned draws outside the
  support once the retained mass got small. A Newton step from the bracketed
  root supplies the implicit derivative, so sampling stays differentiable. This
  removes the need for the `gammainccinv` wrapper, so `util.py` is untouched.
- `mean` and `variance` now return nan for an underflowed normalizer, matching
  `cdf`; documented why that differs from `log_prob` returning -inf.
- Documented the float32 cancellation in `E[X^2] - E[X]^2` for narrow intervals
  far from the origin.
- Fixed two line-wrapped reST cross-references, gave the base-distribution
  assert a message pointing at TruncatedGamma, dropped a test assertion that
  measured scipy's accuracy rather than ours, and restored the file's
  left/right/two-sided ordering in batch_util.

* Conform to the Array return annotations from #2206

Narrow the new classes' r... (continued)

247 of 247 new or added lines in 2 files covered. (100.0%)

15144 of 16348 relevant lines covered (92.64%)

1.69 hits per line

Jobs
ID Job ID Ran Files Coverage
1 examples - 34692431167.1 12 Sep 2026 12:18PM UTC 86
28.84
GitHub Action Run
2 test-modeling - 34692431167.2 12 Sep 2026 12:51PM UTC 86
69.83
GitHub Action Run
3 test-inference - 34692431167.3 12 Sep 2026 12:58PM UTC 86
69.87
GitHub Action Run
Source Files on build 34692431167
  • Tree
  • List 86
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34692431167
  • 9e966f38 on github
  • Prev Build on master (#34366780795)
  • Next Build on master (#34692604847)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc