Skip to content
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

Minor fix of blackjax import in fit_pathfinder function #443

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

aphc14
Copy link
Contributor

@aphc14 aphc14 commented Mar 29, 2025

Hi all, just a minor change for users who don't have JAX/BlackJAX installed.

Summary of changes:

  • Moved the import statement for blackjax to ensure it is only imported when needed.
  • Moved blackjax import statement to prevent import errors for users wanting to run pathfinder without JAX/BlackJAX installed.
  • Updated the fit function to specify the return type as az.InferenceData.

* Moved the import statement for blackjax to ensure it is only imported when needed.
* Moved blackjax import statement prevents import errors for users on Windows.
* Updated the fit function to specify the return type as az.InferenceData.
Copy link
Contributor

@zaxtax zaxtax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@zaxtax zaxtax merged commit 1fff560 into pymc-devs:main Apr 9, 2025
5 checks passed
aphc14 added a commit to aphc14/pymc-extras that referenced this pull request Apr 10, 2025
aphc14 added a commit to aphc14/pymc-extras that referenced this pull request Apr 10, 2025
…nsum

* Modified the calculation of  in  and  to use  instead of the deprecated  function.
* Added calculations for  in  to improve readability.
* Renamed  to  in pathfinder functions to reflect API changes.
* Updated warning filters to ignore UserWarnings related to einsum subscripts.
@aphc14 aphc14 deleted the minor-fix-move-blackjax-dependency branch April 10, 2025 14:29
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.

2 participants