PyMC Warning causing simulations to run very slowly

Hi,

When I use pymc on Pycharm, I get the following warning:
WARNING (pytensor.tensor.blas): Using NumPy C-API based implementation for BLAS functions.

Can can i fix this as it is causing my MCMC simulations to run very slow.

When I checked my PATH, I get this on my Macbook:
% echo $PATH

/Users/patrickorourke/anaconda3/bin:/Users/patrickorourke/anaconda3/condabin:/usr/local/bin:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib/python3.7/site-packages:/Library/TeX/texbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Applications/quarto/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Postgres.app/Contents/Versions/latest/bin

Can you please help?

Thanks,
Patrick

1 Like

Hi Patrick, I’d recommend creating a fresh conda environment (you can use one of the environment configuration files in the “conda-envs” subdirectory). The conda packages will set you up with a numpy that has BLAS configured.

Hi Patrick,

The warning you’re seeing means PyMC is using a slower method for calculations, which is making your simulations run slowly. To fix this, you can install a faster math library called BLAS. Here’s a guide to help you set it up on your Macbook: Link to guide.

This should speed up your simulations!

Best regards,
@furiosa