The data is about 50,000 records that I am feeding to this model. Upon running the snippet posted above, the RAM on my computer fills up (8 cores, 64gb RAM), then the RAM usage by Python drops but the RAM seems to still be occupied somewhere, until eventually it errors out (and most of the RAM seems to still be in use, possibly cached or leaked perhaps?). The error, based on the trace:
Traceback (most recent call last):
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py”, line 3296, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File “”, line 18, in
y_like = Normal(‘y_like’, mu=N, sd=sigma_y, observed=y_train.values)
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\pymc3\distributions\distribution.py”, line 42, in new
return model.Var(name, dist, data, total_size)
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\pymc3\model.py”, line 839, in Var
total_size=total_size, model=self)
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\pymc3\model.py”, line 1327, in init
self.logp_sum_unscaledt = distribution.logp_sum(data)
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\pymc3\distributions\distribution.py”, line 119, in logp_sum
return tt.sum(self.logp(*args, **kwargs))
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\pymc3\distributions\continuous.py”, line 480, in logp
return bound((-tau * (value - mu)**2 + tt.log(tau / np.pi / 2.)) / 2.,
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\tensor\var.py”, line 147, in sub
return theano.tensor.basic.sub(self, other)
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\gof\op.py”, line 674, in call
required = thunk()
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\gof\op.py”, line 862, in rval
thunk()
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\theano\gof\cc.py”, line 1735, in call
reraise(exc_type, exc_value, exc_trace)
File “C:\Users\CN149325\AppData\Local\Continuum\anaconda3\lib\site-packages\six.py”, line 693, in reraise
raise value
MemoryError: None