Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Use of deprecated / removed numba.config.CAPTURED_ERRORS #17703

Open
TomAugspurger opened this issue Jan 9, 2025 · 0 comments · May be fixed by #17705
Open

[BUG]: Use of deprecated / removed numba.config.CAPTURED_ERRORS #17703

TomAugspurger opened this issue Jan 9, 2025 · 0 comments · May be fixed by #17705
Labels
bug Something isn't working

Comments

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Jan 9, 2025

Describe the bug
In

self.CAPTURED_ERRORS = numba_config.CAPTURED_ERRORS
, cudf uses numba.config.CAPTURED_ERRORS. This is deprecated in numba 0.60, and removed in numba 0.61 (not yet released). See numba/numba#9773

Steps/Code to reproduce bug

  1. Install numba>=0.61 with something like PIP_PRE=true pip install --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple "cudf-cu12" "dask-cudf-cu12"

  2. Hit that code:

>>> from cudf.utils._numba import _CUDFNumbaConfig
>>> with _CUDFNumbaConfig(): pass
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/raid/toaugspurger/envs/dask-upstream-testing/lib/python3.12/site-packages/cudf/utils/_numba.py", line 145, in __enter__
    self.CAPTURED_ERRORS = numba_config.CAPTURED_ERRORS
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'numba.core.config' has no attribute 'CAPTURED_ERRORS'

An example of some user-facing code that hits that:

import dask.dataframe as dd
import pandas as pd
import cudf

df = cudf.DataFrame({"a": [1, 2, 3, 1, 2, 3], "b": [4, 5, 6, 7, 8, 9]})
df.groupby("a").apply(lambda x: x)

Expected behavior

For numba 0.60 and earlier, no change is needed. We could check the numba version and if it's >= 0.61, just don't do anything with CAPTURED_ERRORS (IIUC, we want the new behavior).

Environment overview (please complete the following information)

  • Environment location: Bare-metal
  • Method of cuDF install: conda/pip

Environment details

Click here to see environment details
 **git***
 Not inside a git repository
 
 ***OS Information***
 DGX_NAME="DGX Server"
 DGX_PRETTY_NAME="NVIDIA DGX Server"
 DGX_SWBUILD_DATE="2023-03-27-13-31-04"
 DGX_SWBUILD_VERSION="5.5.0"
 DGX_COMMIT_ID="b2e06e0"
 DGX_PLATFORM="DGX Server for DGX-1"
 DGX_SERIAL_NUMBER="QTFCOU8220028"
 
 DGX_OTA_VERSION="5.6.0"
 DGX_OTA_DATE="Wed 22 May 2024 01:41:19 PM PDT"
 DISTRIB_ID=Ubuntu
 DISTRIB_RELEASE=20.04
 DISTRIB_CODENAME=focal
 DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
 NAME="Ubuntu"
 VERSION="20.04.6 LTS (Focal Fossa)"
 ID=ubuntu
 ID_LIKE=debian
 PRETTY_NAME="Ubuntu 20.04.6 LTS"
 VERSION_ID="20.04"
 HOME_URL="https://www.ubuntu.com/"
 SUPPORT_URL="https://help.ubuntu.com/"
 BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
 PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
 VERSION_CODENAME=focal
 UBUNTU_CODENAME=focal
 Linux dgx12 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
 
 ***GPU Information***
 Thu Jan  9 05:25:02 2025
 +---------------------------------------------------------------------------------------+
 | NVIDIA-SMI 535.161.08             Driver Version: 535.161.08   CUDA Version: 12.2     |
 |-----------------------------------------+----------------------+----------------------+
 | 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  Tesla V100-SXM2-32GB           On  | 00000000:06:00.0 Off |                    0 |
 | N/A   34C    P0              56W / 300W |    835MiB / 32768MiB |      0%      Default |
 |                                         |                      |                  N/A |
 +-----------------------------------------+----------------------+----------------------+
 |   1  Tesla V100-SXM2-32GB           On  | 00000000:07:00.0 Off |                    0 |
 | N/A   34C    P0              60W / 300W |    711MiB / 32768MiB |      0%      Default |
 |                                         |                      |                  N/A |
 +-----------------------------------------+----------------------+----------------------+
 |   2  Tesla V100-SXM2-32GB           On  | 00000000:0A:00.0 Off |                    0 |
 | N/A   29C    P0              42W / 300W |      3MiB / 32768MiB |      0%      Default |
 |                                         |                      |                  N/A |
 +-----------------------------------------+----------------------+----------------------+
 |   3  Tesla V100-SXM2-32GB           On  | 00000000:0B:00.0 Off |                    0 |
 | N/A   29C    P0              41W / 300W |      3MiB / 32768MiB |      0%      Default |
 |                                         |                      |                  N/A |
 +-----------------------------------------+----------------------+----------------------+
 |   4  Tesla V100-SXM2-32GB           On  | 00000000:85:00.0 Off |                    0 |
 | N/A   31C    P0              42W / 300W |      3MiB / 32768MiB |      0%      Default |
 |                                         |                      |                  N/A |
 +-----------------------------------------+----------------------+----------------------+
 |   5  Tesla V100-SXM2-32GB           On  | 00000000:86:00.0 Off |                    0 |
 | N/A   33C    P0              42W / 300W |      3MiB / 32768MiB |      0%      Default |
 |                                         |                      |                  N/A |
 +-----------------------------------------+----------------------+----------------------+
 |   6  Tesla V100-SXM2-32GB           On  | 00000000:89:00.0 Off |                    0 |
 | N/A   34C    P0              43W / 300W |      3MiB / 32768MiB |      0%      Default |
 |                                         |                      |                  N/A |
 +-----------------------------------------+----------------------+----------------------+
 |   7  Tesla V100-SXM2-32GB           On  | 00000000:8A:00.0 Off |                    0 |
 | N/A   29C    P0              42W / 300W |      3MiB / 32768MiB |      0%      Default |
 |                                         |                      |                  N/A |
 +-----------------------------------------+----------------------+----------------------+
 
 +---------------------------------------------------------------------------------------+
 | Processes:                                                                            |
 |  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
 |        ID   ID                                                             Usage      |
 |=======================================================================================|
 |    0   N/A  N/A   1863455      C   ...e/conda/envs/onepool-env/bin/python      830MiB |
 |    1   N/A  N/A   1863455      C   ...e/conda/envs/onepool-env/bin/python      706MiB |
 +---------------------------------------------------------------------------------------+
 
 ***CPU***
 Architecture:                       x86_64
 CPU op-mode(s):                     32-bit, 64-bit
 Byte Order:                         Little Endian
 Address sizes:                      46 bits physical, 48 bits virtual
 CPU(s):                             80
 On-line CPU(s) list:                0-79
 Thread(s) per core:                 2
 Core(s) per socket:                 20
 Socket(s):                          2
 NUMA node(s):                       2
 Vendor ID:                          GenuineIntel
 CPU family:                         6
 Model:                              79
 Model name:                         Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz
 Stepping:                           1
 CPU MHz:                            2503.374
 CPU max MHz:                        3600.0000
 CPU min MHz:                        1200.0000
 BogoMIPS:                           4390.15
 Virtualization:                     VT-x
 L1d cache:                          1.3 MiB
 L1i cache:                          1.3 MiB
 L2 cache:                           10 MiB
 L3 cache:                           100 MiB
 NUMA node0 CPU(s):                  0-19,40-59
 NUMA node1 CPU(s):                  20-39,60-79
 Vulnerability Gather data sampling: Not affected
 Vulnerability Itlb multihit:        KVM: Mitigation: Split huge pages
 Vulnerability L1tf:                 Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
 Vulnerability Mds:                  Mitigation; Clear CPU buffers; SMT vulnerable
 Vulnerability Meltdown:             Mitigation; PTI
 Vulnerability Mmio stale data:      Mitigation; Clear CPU buffers; SMT vulnerable
 Vulnerability Retbleed:             Not affected
 Vulnerability Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and seccomp
 Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
 Vulnerability Spectre v2:           Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling, PBRSB-eIBRS Not affected
 Vulnerability Srbds:                Not affected
 Vulnerability Tsx async abort:      Mitigation; Clear CPU buffers; SMT vulnerable
 Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap intel_pt xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts md_clear flush_l1d
 
 ***CMake***
 /usr/bin/cmake
 cmake version 3.16.3
 
 CMake suite maintained and supported by Kitware (kitware.com/cmake).
 
 ***g++***
 /usr/bin/g++
 g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
 Copyright (C) 2019 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
 ***nvcc***
 /usr/local/cuda/bin/nvcc
 nvcc: NVIDIA (R) Cuda compiler driver
 Copyright (c) 2005-2024 NVIDIA Corporation
 Built on Thu_Mar_28_02:18:24_PDT_2024
 Cuda compilation tools, release 12.4, V12.4.131
 Build cuda_12.4.r12.4/compiler.34097967_0
 
 ***Python***
 /raid/toaugspurger/envs/dask-upstream-testing/bin/python
 Python 3.12.8
 
 ***Environment Variables***
 PATH                            : /raid/toaugspurger/envs/dask-upstream-testing/bin:/home/nfs/toaugspurger/miniforge3/condabin:/home/nfs/toaugspurger/.vscode-server/cli/servers/Stable-fabdb6a30b49f79a7aba0f2ad9df9b399473380f/server/bin/remote-cli:/home/nfs/toaugspurger/.local/bin:/usr/local/cuda/bin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda/bin
 LD_LIBRARY_PATH                 :
 NUMBAPRO_NVVM                   :
 NUMBAPRO_LIBDEVICE              :
 CONDA_PREFIX                    : /raid/toaugspurger/envs/dask-upstream-testing
 PYTHON_PATH                     :
 
 ***conda packages***
 conda is /home/nfs/toaugspurger/miniforge3/condabin/conda
 /home/nfs/toaugspurger/miniforge3/condabin/conda
 # packages in environment at /raid/toaugspurger/envs/dask-upstream-testing:
 #
 # Name                    Version                   Build  Channel
 _libgcc_mutex             0.1                 conda_forge    conda-forge
 _openmp_mutex             4.5                       2_gnu    conda-forge
 attrs                     24.3.0                   pypi_0    pypi
 bzip2                     1.0.8                h4bc722e_7    conda-forge
 ca-certificates           2024.12.14           hbcca054_0    conda-forge
 cachetools                5.5.0                    pypi_0    pypi
 cfgv                      3.4.0                    pypi_0    pypi
 click                     8.1.8                    pypi_0    pypi
 cloudpickle               3.1.0                    pypi_0    pypi
 coverage                  7.6.10                   pypi_0    pypi
 cuda-python               12.6.2.post1             pypi_0    pypi
 cudf-cu12                 25.2.0a246               pypi_0    pypi
 cupy-cuda12x              13.3.0                   pypi_0    pypi
 dask                      2024.12.1                pypi_0    pypi
 dask-cudf-cu12            25.2.0a246               pypi_0    pypi
 dask-expr                 1.1.21                   pypi_0    pypi
 distlib                   0.3.9                    pypi_0    pypi
 distributed               2024.12.1                pypi_0    pypi
 execnet                   2.1.1                    pypi_0    pypi
 fastrlock                 0.8.3                    pypi_0    pypi
 filelock                  3.16.1                   pypi_0    pypi
 fsspec                    2024.12.0                pypi_0    pypi
 hypothesis                6.123.11                 pypi_0    pypi
 identify                  2.6.5                    pypi_0    pypi
 iniconfig                 2.0.0                    pypi_0    pypi
 jinja2                    3.1.5                    pypi_0    pypi
 ld_impl_linux-64          2.43                 h712a8e2_2    conda-forge
 libcudf-cu12              25.2.0a246               pypi_0    pypi
 libexpat                  2.6.4                h5888daf_0    conda-forge
 libffi                    3.4.2                h7f98852_5    conda-forge
 libgcc                    14.2.0               h77fa898_1    conda-forge
 libgcc-ng                 14.2.0               h69a702a_1    conda-forge
 libgomp                   14.2.0               h77fa898_1    conda-forge
 libkvikio-cu12            25.2.0a24                pypi_0    pypi
 liblzma                   5.6.3                hb9d3cd8_1    conda-forge
 libnsl                    2.0.1                hd590300_0    conda-forge
 libsqlite                 3.47.2               hee588c1_0    conda-forge
 libuuid                   2.38.1               h0b41bf4_0    conda-forge
 libxcrypt                 4.4.36               hd590300_1    conda-forge
 libzlib                   1.3.1                hb9d3cd8_2    conda-forge
 llvmlite                  0.44.0rc2                pypi_0    pypi
 locket                    1.0.0                    pypi_0    pypi
 markdown-it-py            3.0.0                    pypi_0    pypi
 markupsafe                3.0.2                    pypi_0    pypi
 mdurl                     0.1.2                    pypi_0    pypi
 msgpack                   1.1.0                    pypi_0    pypi
 ncurses                   6.5                  he02047a_1    conda-forge
 nodeenv                   1.9.1                    pypi_0    pypi
 numba                     0.61.0rc2                pypi_0    pypi
 numba-cuda                0.0.17.1                 pypi_0    pypi
 numpy                     2.1.3                    pypi_0    pypi
 nvidia-ml-py              12.560.30                pypi_0    pypi
 nvidia-nvcomp-cu12        4.1.0.6                  pypi_0    pypi
 nvtx                      0.2.10                   pypi_0    pypi
 openssl                   3.4.0                h7b32b05_1    conda-forge
 packaging                 24.2                     pypi_0    pypi
 pandas                    2.2.3                    pypi_0    pypi
 partd                     1.4.2                    pypi_0    pypi
 pip                       24.3.1             pyh8b19718_2    conda-forge
 platformdirs              4.3.6                    pypi_0    pypi
 pluggy                    1.5.0                    pypi_0    pypi
 pre-commit                4.0.1                    pypi_0    pypi
 psutil                    6.1.1                    pypi_0    pypi
 pyarrow                   18.1.0                   pypi_0    pypi
 pygments                  2.19.1                   pypi_0    pypi
 pylibcudf-cu12            25.2.0a246               pypi_0    pypi
 pynvjitlink-cu12          0.4.0                    pypi_0    pypi
 pynvml                    12.0.0                   pypi_0    pypi
 pytest                    8.3.4                    pypi_0    pypi
 pytest-cov                6.0.0                    pypi_0    pypi
 pytest-rerunfailures      15.0                     pypi_0    pypi
 pytest-timeout            2.3.1                    pypi_0    pypi
 pytest-xdist              3.6.1                    pypi_0    pypi
 python                    3.12.8          h9e4cc4f_1_cpython    conda-forge
 python-dateutil           2.9.0.post0              pypi_0    pypi
 pytz                      2024.2                   pypi_0    pypi
 pyyaml                    6.0.2                    pypi_0    pypi
 rapids-dask-dependency    25.2.0a9                 pypi_0    pypi
 readline                  8.2                  h8228510_1    conda-forge
 rich                      13.9.4                   pypi_0    pypi
 rmm-cu12                  25.2.0a37                pypi_0    pypi
 setuptools                75.6.0             pyhff2d567_1    conda-forge
 six                       1.17.0                   pypi_0    pypi
 sortedcontainers          2.4.0                    pypi_0    pypi
 tblib                     3.0.0                    pypi_0    pypi
 tk                        8.6.13          noxft_h4845f30_101    conda-forge
 toolz                     1.0.0                    pypi_0    pypi
 tornado                   6.4.2                    pypi_0    pypi
 typing-extensions         4.12.2                   pypi_0    pypi
 tzdata                    2024.2                   pypi_0    pypi
 urllib3                   2.3.0                    pypi_0    pypi
 virtualenv                20.28.1                  pypi_0    pypi
 wheel                     0.45.1             pyhd8ed1ab_1    conda-forge
 zict                      3.0.0                    pypi_0    pypi

Additional context
Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant