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

pyro-ppl / numpyro / 15420977552 / 3
93%
master: 93%

Build:
DEFAULT BRANCH: master
Ran 03 Jun 2025 03:47PM UTC
Files 88
Run time 307min
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: 55.802% (+0.2%) from 55.584%
15420977552.3

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)

8204 of 14702 relevant lines covered (55.8%)

0.56 hits per line

Source Files on job examples - 15420977552.3
  • Tree
  • List 88
  • Changed 15
  • Source Changed 15
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 15420977552
  • 4c505c18 on github
  • Prev Job for on master (#15396916251.2)
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