pymc3 is running very slowly after upgrading to a new more powerful laptop

  pymc3, python-3.x, theano
import pymc3 as pm 
import numpy as np 

x = np.linspace(0,1,100)
y_true = 3*x + 5 
y_obs = y_true + np.random.normal(loc=0, scale=0.02,size=100)

with pm.Model() as model:
    a = pm.Normal('a', mu=2.0, sigma=3.0) 
    b = pm.Normal('b', mu=2.0, sigma=3.0) 
    y_model = a*x + b 
    s = pm.HalfNormal('s', sigma=0.05)
    likelihood = pm.Normal('y', mu=y_model, sigma=s, observed = y_obs)

trace = pm.sample(500, tune=500, chains=2, cores=1, model=model)

I upgraded to a new laptop and pymc3 is running extremely slowly. The simple linear regression which would take 2-3 seconds on my old laptop is now taking ~10 mins!!

Laptop: Windows 10, Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz 2.30 GHz with 32 GB RAM.

python: 3.7
pymc3: 3.9.3
Theano: 1.0.5
I don’t have the m2w64-toolchain installed. Tried that and pymc3 doesn’t even load. So, reinstalled Anaconda after that.

Any ideas what could be making it so slow? Is it a theano problem?


Source: Python-3x Questions