AttributeError: Can't pickle local object 'Mixture._comp_dist_random_wrapper.<locals>.wrapped_random'

Setting the number of cores equal to 1 solved the issue. Specifically:

trace1 = pm.sample(1000, cores=1)

I’ll raise a bug on Github.

1 Like