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

pyro-ppl / numpyro / 33474642619
93%

Build:
DEFAULT BRANCH: master
Ran 01 Sep 2026 06:04AM 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

01 Sep 2026 05:42AM UTC coverage: 92.508% (+0.2%) from 92.354%
33474642619

push

github

web-flow
Ensure distribution moments/samples are jax arrays (#2206)

* Add parametrized test that distribution outputs are jax arrays

test_output_is_array checks that sample/log_prob/mean/variance/entropy
return jax.Array rather than python/numpy scalars, parametrized per
method so the per-method coverage is visible. Methods whose output type
tracks the input (e.g. Poisson.mean is self.rate, Beta.mean is plain
python arithmetic) are recorded in OUTPUT_TYPE_XFAIL and marked strict
xfail, so the dict must be updated if any of them later returns an array.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Narrow method return annotations from ArrayLike to Array

The distribution methods sample/log_prob/mean/variance/entropy return jax
arrays for every distribution exercised by test_output_is_array, so their
return type is narrowed from ArrayLike to Array. ArrayLike is the correct
type for an input (a method does accept python/numpy scalars), but on an
output it is an under-specified promise: it admits bool/int/float/complex
that the method never returns and that a consumer cannot index or reshape.

Input parameter annotations are left as ArrayLike. The implementation-
dependent tail recorded in OUTPUT_TYPE_XFAIL (e.g. Poisson.mean is
self.rate, Beta.mean is plain python arithmetic) keeps ArrayLike, since
those genuinely return a python/numpy scalar when given scalar params.

TransformedDistribution.sample keeps a `# type: ignore[return-value]`
rather than coercing, because Transform.__call__ is typed to return the
wide ArrayLike while the value is already a jax array at runtime.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Parametrize output-type test over jit and assert arrays under jit

Under jax.jit every method output is materialised as a jax array, so the
moment exceptions in OUTPUT_TYPE_XFAIL only apply in the non-jitted case;
the jitted case asserts every method returns a jax array with no exceptions.

Co-Authored-By: Claude Opus 4... (continued)

720 of 727 new or added lines in 14 files covered. (99.04%)

1 existing line in 1 file now uncovered.

14892 of 16098 relevant lines covered (92.51%)

1.68 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
96.49
0.5% numpyro/distributions/discrete.py
2
89.76
-0.87% numpyro/distributions/censored.py
1
96.93
0.0% numpyro/distributions/batch_util.py

Coverage Regressions

Lines Coverage ∆ File
1
89.76
-0.87% numpyro/distributions/censored.py
Jobs
ID Job ID Ran Files Coverage
1 test-modeling - 33474642619.1 01 Sep 2026 06:58AM UTC 86
69.35
GitHub Action Run
2 test-inference - 33474642619.2 01 Sep 2026 06:40AM UTC 86
70.38
GitHub Action Run
3 examples - 33474642619.3 01 Sep 2026 06:04AM UTC 86
28.69
GitHub Action Run
Source Files on build 33474642619
  • Tree
  • List 86
  • Changed 14
  • Source Changed 14
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33474642619
  • 74be6e1e on github
  • Prev Build on master (#33474432102)
  • Next Build on master (#33562600502)
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