Skip to content

Conversation

@aseyboldt
Copy link
Member

This fixes two issues:

  • Sampling many pymc models with jax was throwing an error, because of a shape problem introduced in v0.16.0.
  • With the release of ipykernel 7.0.0, the progressbar doesn't currently work, and nutpie was spamming the output with error messages. The progressbar itself needs a fix from ipykernel, but with this release nutpie only prints the error message once.

@aseyboldt aseyboldt requested a review from Copilot October 22, 2025 20:54
Copy link

Copilot AI left a 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 bugfix release v0.16.2, addressing two issues: a shape handling bug in PyMC models with JAX backend introduced in v0.16.0, and excessive error message spam from the progress bar due to ipykernel 7.0.0 compatibility issues.

  • Fixed shape mismatch errors when sampling PyMC models with JAX backend by properly reshaping arrays instead of flattening them
  • Prevented repeated error message spam in progress display by only printing the error once
  • Improved error messages in Rust code to include variable names for better debugging

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
python/nutpie/compile_pymc.py Fixed expand function to reshape arrays to correct shape instead of raveling them
python/nutpie/sample.py Added flag to print progress display errors only once
src/pyfunc.rs Enhanced error messages with variable names and added dimension validation
tests/test_pymc.py Added test cases for various array shapes including scalar, 1D, and 2D
Cargo.toml Bumped version to 0.16.2
CHANGELOG.md Documented bug fixes for this release

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@aseyboldt aseyboldt merged commit 8d3078f into pymc-devs:main Oct 22, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant