Skip to content

Conversation

Dekermanjian
Copy link
Contributor

import progress bar functions from pymc.progress_bar instead of pymc.util

This addresses the issue in #541

What I am not sure of though is what happens if a user wants to use the latest pymc-extras version with pymc<5.24.0?

Copy link
Member

@jessegrabowski jessegrabowski left a comment

Choose a reason for hiding this comment

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

Tests are failing because of the changed import -- my guess is we have to update a version pin?

@jessegrabowski
Copy link
Member

What I am not sure of though is what happens if a user wants to use the latest pymc-extras version with pymc<5.24.0?

@maresb

@Dekermanjian
Copy link
Contributor Author

Tests are failing because of the changed import -- my guess is we have to update a version pin?

@jessegrabowski Yes, the majority of tests are failing because of the version of PyMC used is <5.24.0 in the tests. There is one more issue with preliz also not being able to be imported and that is causing the tests in test_prior.py to not run.

@jessegrabowski
Copy link
Member

Could you pin pymc>=5.24.0 in this PR?

@ricardoV94
Copy link
Member

Preliz needs to change it's import from compile_pymc to compile

@ricardoV94
Copy link
Member

arviz-devs/preliz#682

@ricardoV94
Copy link
Member

You can put a temporary xfail on the preliz test, and import inside the relevant test only

@jessegrabowski
Copy link
Member

jessegrabowski commented Jul 19, 2025

preliz already fixed it and cut a release, but it's not out of conda-forge yet

arviz-devs/preliz#680

@ricardoV94
Copy link
Member

I see, then just wait 1/2 days? If you're confident everything is fixed feel free to merge

@jessegrabowski
Copy link
Member

@ricardoV94 I think something about the progress bar update is breaking pickling on windows.

@ricardoV94
Copy link
Member

Maybe the custom sampler is broken? You can change the test to run with cores=1 to see the error message

@jessegrabowski
Copy link
Member

No error raised when cores=1

@ricardoV94
Copy link
Member

Odd can you reproduce locally?

@jessegrabowski
Copy link
Member

Yeah. It happens on windows because it defaults to mp_ctx='spawn'. It will happen on linux too if you set this manually.

@ricardoV94
Copy link
Member

And didn't happen before our changes? So odd

@jessegrabowski
Copy link
Member

jessegrabowski commented Jul 20, 2025

The error appears to be an infinite recursion when trying to unpickle the inner function in PointFunc. That was recently changed in this commit, which might be the actual source of the problems?

Edit: Reverting that commit (and the preceding one) solves the issue 🤔

What was the motivation for those changes?

@jessegrabowski jessegrabowski merged commit 82621a2 into pymc-devs:main Jul 21, 2025
17 of 30 checks passed
@jessegrabowski
Copy link
Member

Thank you @Dekermanjian !

@Dekermanjian
Copy link
Contributor Author

Happy to help! I am glad this is resolved now!

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.

3 participants