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

pyro-ppl / numpyro / 15420977552
93%

Build:
DEFAULT BRANCH: master
Ran 03 Jun 2025 03:27PM UTC
Jobs 3
Files 88
Run time 502min
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

03 Jun 2025 03:06PM UTC coverage: 92.865%. First build
15420977552

push

github

web-flow
feat(gh-299): Type hints in distributions modules (#2032)

* feat(deps): add jaxtyping for type hinting support

* Refactor distribution module with type annotations and improve validation

- Added type annotations to various methods and properties in the Distribution class and its subclasses for better type checking and clarity.
- Updated the `enable_validation` and `validation_enabled` functions to use type hints.
- Enhanced the `arg_constraints`, `support`, and other attributes with appropriate types.
- Modified the `__init__` methods of several distribution classes to include type hints for parameters.
- Improved the `log_prob`, `sample`, and other methods to specify return types.
- Refactored the `clamp_probs` function in the util module to include type annotations.

* Enhance type annotations and add typing protocols for distributions

- Updated the `LeftTruncatedDistribution`, `RightTruncatedDistribution`, and `TwoSidedTruncatedDistribution` classes to include type hints for parameters and return types.
- Introduced a new `ConstraintLike` protocol in `numpyro/typing.py` to standardize constraint types across distributions.
- Added type hints for the `TruncatedDistribution`, `TruncatedCauchy`, `TruncatedNormal`, `TruncatedPolyaGamma`, `DoublyTruncatedPowerLaw`, and `LowerTruncatedPowerLaw` classes.
- Improved type safety and clarity in the distribution methods by specifying expected types for inputs and outputs.

* refactor(typing): move protocols to _typing.py and update imports across modules

* refactor: update set_default_validate_args to accept only bool type

* refactor: add type annotations for constraint variables in constraints.py

* fix: use `Union` type instead of `|` operator for python3.9 compatible types

* chore: isolate unit tests for custom types by numpyro

* chore: remove jaxtyping and its types with appropriate jax native types

* fix(test): import jax for compatibility and update xfail condition

* refactor: rename Protocols... (continued)

996 of 996 new or added lines in 14 files covered. (100.0%)

13653 of 14702 relevant lines covered (92.86%)

1.98 hits per line

Jobs
ID Job ID Ran Files Coverage
1 test-inference - 15420977552.1 03 Jun 2025 03:47PM UTC 88
72.55
GitHub Action Run
2 test-modeling - 15420977552.2 03 Jun 2025 03:46PM UTC 88
69.82
GitHub Action Run
3 examples - 15420977552.3 03 Jun 2025 03:27PM UTC 88
55.8
GitHub Action Run
Source Files on build 15420977552
  • Tree
  • List 88
  • Changed 15
  • Source Changed 15
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #15420977552
  • 4c505c18 on github
  • Prev Build on master (#15396916251)
  • Next Build on master (#15427333535)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc