-
Notifications
You must be signed in to change notification settings - Fork 22
Prepare 0.15.0 #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare 0.15.0 #214
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR prepares a new release by bumping package and dependency versions, adds support for zero-size variables and low-rank mass matrix sampling in both Stan and PyMC backends, and updates the Python sampling interface with new parameters.
- Add tests for low-rank mass matrix and zero-size variables in Stan and PyMC
- Extend
sample()interface with optional parameters (low_rank_modified_mass_matrix,transform_adapt,progress_*) - Bump crate and dependency versions for release
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_stan.py | Added low-rank and zero-size variable tests for Stan backend |
| tests/test_pymc.py | Added low-rank and zero-size variable tests for PyMC backend |
| src/stan.rs | Handle empty parameter string and track sample count |
| src/pymc.rs | Track sample count and update pointer arithmetic |
| python/nutpie/sample.py | Extend sample signature with new options |
| Cargo.toml | Bump package version and dependencies |
| CHANGELOG.md | Document release 0.15.0 changes |
Comments suppressed due to low confidence (4)
tests/test_stan.py:60
- The
test_emptytest has no assertions and will always pass; consider adding assertions (or marking it xfail) to verify the expected behavior for zero-size variables.
nutpie.sample(compiled_model)
tests/test_pymc.py:44
- The
test_low_ranktest does not assert any properties oftrace.posterior.a; consider adding assertions on its shape or values to ensure the low-rank path is exercised.
trace.posterior.a # noqa: B018
src/pymc.rs:18
- The trait
CheckedEuclidmay not exist underrand_distr::num_traits; verify the correct trait import forchecked_div_rem_euclidor use standard integer methods for division and remainder.
use rand_distr::num_traits::CheckedEuclid;
src/pymc.rs:180
- Using
unwrap_or((self.count, 0))hides a potential division-by-zero or invalid division case; handle zerosizeexplicitly or propagate an error rather than defaulting.
.checked_div_rem_euclid(&size)
| ) -> arviz.InferenceData: ... | ||
|
|
||
|
|
||
| @overload | ||
| def sample( | ||
| compiled_model: CompiledModel, | ||
| *, | ||
| draws: int | None = None, | ||
| tune: int | None = None, | ||
| chains: int | None = None, | ||
| cores: int | None = None, | ||
| seed: int | None = None, | ||
| save_warmup: bool = True, | ||
| progress_bar: bool = True, | ||
| low_rank_modified_mass_matrix: bool = False, | ||
| transform_adapt: bool = False, | ||
| init_mean: Optional[np.ndarray], | ||
| return_raw_trace: bool, | ||
| init_mean: np.ndarray | None = None, | ||
| return_raw_trace: bool = False, | ||
| blocking: Literal[True], | ||
| progress_template: str | None = None, | ||
| progress_style: str | None = None, | ||
| progress_rate: int = 100, | ||
| **kwargs, | ||
| ) -> arviz.InferenceData: ... |
Copilot
AI
May 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring isn’t updated to cover the new parameters progress_template, progress_style, and progress_rate, and the documented default for progress_rate (500) doesn't match the code default (100); please align the documentation with the signature.
No description provided.