pymc icon indicating copy to clipboard operation
pymc copied to clipboard

"theano-pymc" package on pymc3 Linux conda forge installation instruction fails to work

Open ligonliu opened this issue 3 years ago • 1 comments

Thank you for looking at my issue.

Description of your problem

I ran the command provided on the installation guide: conda install -c conda-forge pymc3 theano-pymc mkl mkl-service conda is able to install all packages, but import pymc3 or import theano immediately errors out.

Please provide a minimal, self-contained, and reproducible example.

import theano

Please provide the full traceback.

Complete error traceback
>>> import theano
/home/ligonliu/miniconda3/envs/pymc3/lib/python3.7/site-packages/theano/gpuarray/dnn.py:193: UserWarning: Your cuDNN version is more recent than Theano. If you encounter problems, try updating Theano or downgrading cuDNN to a version >= v5 and <= v7.
  "Your cuDNN version is more recent than "
Using cuDNN version 8400 on context None
Mapped name None to device cuda0: NVIDIA GeForce RTX 3050 Ti Laptop GPU (0000:01:00.0)
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
  File "/home/ligonliu/miniconda3/envs/pymc3/lib/python3.7/site-packages/theano/gpuarray/__init__.py", line 262, in <module>
    use(config.device)
  File "/home/ligonliu/miniconda3/envs/pymc3/lib/python3.7/site-packages/theano/gpuarray/__init__.py", line 251, in use
    optdb.add_tags("gpuarray_opt", "fast_run", "fast_compile")
AttributeError: module 'theano.gpuarray.optdb' has no attribute 'add_tags'

Please provide any additional information below.

Versions and main components

Note: every package is automatically installed by conda

  • PyMC/PyMC3 Version: 3.11.2
  • Aesara/Theano Version: 1.1.2
  • Python Version: 3.7.12
  • Operating system: Linux 5.13.0-41-generic #46~20.04.1-Ubuntu
  • How did you install PyMC/PyMC3: (conda/pip) conda install -c conda-forge pymc3 theano-pymc mkl mkl-service

nvidia-smi output: +-----------------------------------------------------------------------------+ | NVIDIA-SMI 510.47.03 Driver Version: 510.47.03 CUDA Version: 11.6 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... On | 00000000:01:00.0 Off | N/A | | N/A 46C P5 10W / N/A | 548MiB / 4096MiB | 23% Default | | | | N/A | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1460 G /usr/lib/xorg/Xorg 59MiB | | 0 N/A N/A 2135 G /usr/lib/xorg/Xorg 243MiB | | 0 N/A N/A 2300 G /usr/bin/gnome-shell 43MiB | | 0 N/A N/A 45117 G /usr/lib/firefox/firefox 132MiB | | 0 N/A N/A 164476 G ...b/thunderbird/thunderbird 53MiB | | 0 N/A N/A 222059 G ...221959.log --shared-files 2MiB | +-----------------------------------------------------------------------------+

libcudnn version 8.4.0, theano gives out a warning that libcudnn is more recent than theano, not sure if this matters.

ligonliu avatar May 06 '22 19:05 ligonliu

For what it's worth, the most recent comment on this issue (from @twiecki ) in this thread was:

We will not support GPUs via this path in the future. Instead, you could try pymc 4.0.0b2 which has JAX support which has GPU support. We have used it quite effectively, e.g.: MCMC for big datasets: faster sampling with JAX and the GPU - PyMC Labs 53

cluhmann avatar May 17 '22 13:05 cluhmann