Skip to content

make_heap code object inequality at import time #250

Description

@JesseRMeyer

In attempting to go through the introductory material for UMAP, I hit the following exception with import umap:

<code object <module> at ..., file "/path/to/keras/lib/python3.12/path/to/pynndescent/sparse_nndescent.py", line 1> != <code object make_heap at ..., file "/path/to/keras/lib/python3.12/path/to/pynndescent/utils.py", line 171>.

I'm at a loss on how to debug this. Note that the venv here is called "keras".

WSL2
Python 3.12
scikit-learn 1.6
umap-learn 0.5.7
scipy 1.14.1
pynndescent 0.5.13
numpy 2.0.2
numba 0.60.0
keras 3.6.0

Activity

  1. lmcinnes commented on Dec 16, 2024

    @lmcinnes
    Owner

    I have never seen this before. I'll have to see if I can reproduce anything like it locally.

  2. JesseRMeyer commented on Dec 17, 2024

    @JesseRMeyer
    Author

    A member of our group reports that a very similar setup with Python 3.10 works as expected (both on Native Windows and through WSL).

  3. erathorn commented on Jan 6, 2025

    @erathorn

    I have the same issue on my side with the following specifications:

    • Linux
    • Python 3.12
    • scikit-learn=1.6.0
    • scipy=1.15.0
    • umap-learn=0.5.7
    • pynndescent=0.5.13
    • numpy=2.0.2
    • numba=0.60.0

    I installed everything via mamba install -c conda-forge umap-learn.

    Maybe this helps in tracking down the issue.

  4. ratthapon commented on Jan 13, 2025

    @ratthapon

    I have this problem when I run a file using debugger (VS Code). Is there any recommended debugger?

  5. flying-sheep commented on Jan 20, 2025

    @flying-sheep
    Contributor

    Yeah, without being able to use a debugger, I can’t maintain anything …

    This seems to be the asssertion that gets triggered: https://github.com/microsoft/debugpy/blob/39879bdeeae5908a8f3527c77ba252e0930afabc/src/debugpy/_vendored/pydevd/_pydevd_sys_monitoring/_pydevd_sys_monitoring_cython.pyx#L562

    Workaround: microsoft/debugpy#1719

    Current workaround is to downgrade either numba to 0.59.1 or python debugger to v2024.10.0

    (I think using Python 3.11 also works)

    Upstream issue: numba/numba#9760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions