Skip to content

[BUG] graspologic takes 33 seconds to import #1035

@loftusa

Description

@loftusa

Problem

Graspologic is taking an extremely long time to import for me. This is after a fresh pip install --upgrade graspologic. (Also had to pip install --upgrade numba and pip install --upgrade numpy to get it to import)

I timed it and it looks like it takes around 33 seconds, and importing it also gives some strange umap numba warning.

Screenshot 2023-05-20 at 9 19 02 PM

Example Code

Please see How to create a Minimal, Reproducible example for some guidance on creating the best possible example of the problem

from time import time
start = time()
import graspologic
end = time()

print(end - start)

Full Traceback

/usr/local/lib/python3.9/site-packages/umap_learn-0.5.3-py3.9.egg/umap/distances.py:1063: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/usr/local/lib/python3.9/site-packages/umap_learn-0.5.3-py3.9.egg/umap/distances.py:1071: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/usr/local/lib/python3.9/site-packages/umap_learn-0.5.3-py3.9.egg/umap/distances.py:1086: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/usr/local/lib/python3.9/site-packages/umap_learn-0.5.3-py3.9.egg/umap/umap_.py:660: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  @numba.jit()
/usr/local/lib/python3.9/site-packages/graspologic/models/edge_swaps.py:215: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
  _edge_swap_numba = nb.jit(_edge_swap)

Your Environment

  • Python version: 3.9.13
  • graspologic version: 3.0.0

Additional Details

This is in the graphstatsbook docker container with 7 cpus allocated and about 2/3 of my RAM on a 2022 macbook air with m2 chip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnot planned by coreNot planned to be worked on by core team, welcome to propose a plan of action

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions