RAPIDS в Colab AttributeError: модуль cudf не имеет атрибута _lib

Я уже без проблем установил RAPIDS в Colab, пока не попытался импортировать библиотеку cuml. К счастью, у меня есть Tesla 4 в качестве графического процессора.

Вот так я установил RAPIDS

# clone RAPIDS AI rapidsai-csp-utils scripts repo
>> !git clone https://github.com/rapidsai/rapidsai-csp-utils.git    
# install RAPIDS
>> !bash rapidsai-csp-utils/colab/rapids-colab.sh
>> import sys, os
# set necessary environment variables 
>> dist_package_index = sys.path.index('/usr/local/lib/python3.6/dist-packages')
>> sys.path = sys.path[:dist_package_index] + ['/usr/local/lib/python3.6/site-packages']+sys.path[dist_package_index:]
>> sys.path    
# update pyarrow & modules 
>> exec(open('rapidsai-csp-utils/colab/update_modules.py').read(), globals())
Enjoy using RAPIDS!
RAPIDS Version to install is 0.11
Checking for GPU type:
***********************************************************************
Woo! Your instance has the right kind of GPU, a 'Tesla T4'!
***********************************************************************

************************************************
Your Google Colab instance has RAPIDS installed!
************************************************
***********************************************************************
Let us check on those pyarrow and cffi versions...
***********************************************************************
You're running pyarrow 0.15.0 and are good to go!
unloaded cffi 1.11.5
loaded cffi 1.11.5

И когда я попытался импортировать:

>> import cuml

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-31-a450aff8eac6> in <module>()
----> 1 import cuml

5 frames
/usr/local/lib/python3.6/site-packages/cudf/core/dataframe.py in <module>()
     22 
     23 import cudf
---> 24 import cudf._lib as libcudf
     25 import cudf._libxx as libcudfxx
     26 from cudf._libxx.null_mask import MaskState, create_null_mask

AttributeError: module 'cudf' has no attribute '_lib'

Также я поставил это:

>> ! conda list | grep cudf
>> ! conda list | grep cuml
>> ! conda list | grep cugraph
>> ! conda list | grep numpy
>> ! conda list | grep pandas

cudf                      0.13.0                   py36_0    rapidsai/label/main
dask-cudf                 0.13.0                   py36_0    rapidsai/label/main
libcudf                   0.13.0               cuda10.0_0    rapidsai/label/main
cuml                      0.13.0          cuda10.0_py36_0    rapidsai/label/main
libcuml                   0.13.0               cuda10.0_0    rapidsai/label/main
libcumlprims              0.13.0               cuda10.0_0    nvidia
cugraph                   0.13.0                   py36_0    rapidsai/label/main
libcugraph                0.13.0               cuda10.0_0    rapidsai/label/main
numpy                     1.17.5           py36h95a1406_0    conda-forge
pandas                    0.25.3           py36hb3f55d8_0    conda-forge

Это моя проблема, я пытаюсь с RAPIDS использовать его T-SNE, он быстрее, чем Scipy T-SNE.


person Sergio Flores Lanque    schedule 05.06.2020    source источник


Ответы (1)


Спасибо, что поделились этим. Эта проблема была вызвана обновлением numba (0.48.0 - 0.49.0), которое сделало его несовместимым с cudf. Это было решено этим PR https://github.com/rapidsai/rapidsai-csp-utils/pull/18, который блокирует numba до 0,48,0 для 0,13 и ниже.

person TaureanDyerNV    schedule 09.06.2020