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

error in multiprocessing when using current NumPy version #64

Open
thaynecurrie opened this issue Oct 6, 2024 · 0 comments
Open

error in multiprocessing when using current NumPy version #64

thaynecurrie opened this issue Oct 6, 2024 · 0 comments

Comments

@thaynecurrie
Copy link

thaynecurrie commented Oct 6, 2024

Following some of the recent Issues (#60, #62), I edited the orvara source code to remove instances of np.float and np.int and modify .join on the pyplot shareaxis calls.

[I also got Taichi Uyama's error of a mismatch of on the PA and rel-separation output plots between the top and bottom panels but fixed it with a hardcoded sharex command as here: https://stackoverflow.com/questions/77418896/attributeerror-grouperview-object-has-no-attribute-join.]

This gets orvara to run with the current version of NumPy (1.26.4) using one thread.

However, when I attempt to use multiple threads for parallelization, I get a
"AttributeError: 'NoneType' object has no attribute 'nInst'"
on line 206 of main.py .

Is there a quick workaround to this? I am running with Python 3.12 on an Macbook M3 Max and NumPy 1.26.4. On my older laptop running Numpy 1.22.6 and orvara 1.1.2 I get no errors.


Running MCMC ...
[ ] 0%multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/Users/thaynecurrie/anaconda3/lib/python3.12/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/Users/thaynecurrie/anaconda3/lib/python3.12/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
^^^^^^^^^^^^^^^^
File "/Users/thaynecurrie/anaconda3/lib/python3.12/site-packages/ptemcee/sampler.py", line 137, in call
ll = self.logl(x, *self.loglargs, **self.loglkwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/thaynecurrie/Research/Github/repositories/orvara_py311/orvara/orvara/main.py", line 253, in avoid_pickle_lnprob
return lnprob(theta, **_loglkwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/thaynecurrie/Research/Github/repositories/orvara_py311/orvara/orvara/main.py", line 206, in lnprob
params = orbit.Params(theta, i, nplanets, data.nInst, njitters)
^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'nInst'
"""

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

No branches or pull requests

1 participant