-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
macOS: Multiprocessor sampling stops unexpectedly on macOS Catalina if seaborn was imported #3849
Comments
Can you provide a minimal example to reproduce the problem? And how did you reach the conclusion that it could be related to matplotlib? The error message is rather generic. Do you have a trace? |
@rosgori I tried to manually edit the file in my matplotlib installation, it seems to have no effect. Here is a minimal example which demonstrates the problem: import seaborn as sns
import pymc3 as pm
import theano.tensor as tt
import numpy as np
import theano
theano.config.gcc.cxxflags = "-Wno-c++11-narrowing"
features = np.random.rand(4000, 10, 5)
obs_n = [10]*4000
obs_k = [1]*4000
with pm.Model() as model:
θ = pm.Normal('θ_0', 0, 1, shape=(10, 5))
a = pm.Deterministic('a', t t.tensordot(θ, features, axes=[[0,1], [1,2]]))
y_hat = pm.Binomial('y_hat', p=pm.math.invlogit(a), n=obs_n, observed=obs_k)
with model:
trace = pm.sample(target_accept=0.95, tune=1000, draws=200, init='adapt_diag') Sampling does not start
Removing import seaborn solves the problem. |
I had the same problem on Ubuntu. Followed @ivlis advise and removed seaborn. |
We seem to have find a fix to this weird, vexing issue by setting the multiprocessing start method to "forkserver" on MacOS 🎉 This will be shipped with PyMC 3.9 |
Sampling stops with the following error in the console:
Seems to be related with this issue:
matplotlib/matplotlib#15410
I understand that this is an external package issue, but it makes PyMC3 practically unusable.
Please provide any additional information below.
Versions and main components
The text was updated successfully, but these errors were encountered: