-
Notifications
You must be signed in to change notification settings - Fork 145
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] graspologic takes 33 seconds to import #1035
Comments
I don't plan on working on this, but if anyone wants to speed things up, go for it. I'd also just note that importing a specific function or class is usually pretty quick |
I did some light profiling on this with |
that's interesting! and a cool tool/visualization im open to discussing proposed fixes, i just dont really know what could be done here, since those other libraries are out of our controll i can tell you that i dont think we use anything under ot.backend.tensorflow ot ot.backend.torch... so if there's some way to turn off those imports perhaps that could be a big save? |
i wonder why the load time is so much shorter for tuna than you, though? |
no clue, I noticed that too, how long does it take for you?
throw imports inside of functions maybe? makes those functions take "longer" to run, but shorter for anybody who just wants to import the package |
PythonOT/POT#516 i wonder to what extent your issue is related to this? what version of POT are you on? it sounds like the root cause is tensorflow, do you have tensorflow installed in this environment? |
i guess another question - is there a reason you are needing to import all of graspologic, if you're saying you dont want some of these functions? might be much faster to just import the function(s) you need |
does this import stick around? are you paying the cost only the first time? if so, this seems totally reasonable to me, but if you add 33 seconds every time you try to save your graph layout, it's going to be a bit wonky. doesn't mean there won't be other ways to fix it, just that this specific one may not work. |
Problem
Graspologic is taking an extremely long time to import for me. This is after a fresh
pip install --upgrade graspologic
. (Also had topip install --upgrade numba
andpip 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.Example Code
Please see How to create a Minimal, Reproducible example for some guidance on creating the best possible example of the problem
Full Traceback
Your Environment
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.
The text was updated successfully, but these errors were encountered: