GithubHelp home page GithubHelp logo

Comments (9)

bdpedigo avatar bdpedigo commented on June 10, 2024

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

from graspologic.

loftusa avatar loftusa commented on June 10, 2024

I did some light profiling on this with python -X importtime -c 'import graspologic -- here's what came up.
import_times.txt

from graspologic.

loftusa avatar loftusa commented on June 10, 2024

@bdpedigo I looked at this a bit more just now using tuna.
here's the import profile for graspologic:

Screenshot 2023-12-07 at 9 18 44 AM

appears to be mainly the umap import in graspologic.layouts.auto and ot in graspologic.align.seedless_procrustes

from graspologic.

bdpedigo avatar bdpedigo commented on June 10, 2024

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?

from graspologic.

bdpedigo avatar bdpedigo commented on June 10, 2024

i wonder why the load time is so much shorter for tuna than you, though?

from graspologic.

loftusa avatar loftusa commented on June 10, 2024

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?

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?

throw imports inside of functions maybe? makes those functions take "longer" to run, but shorter for anybody who just wants to import the package

from graspologic.

bdpedigo avatar bdpedigo commented on June 10, 2024

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?

from graspologic.

bdpedigo avatar bdpedigo commented on June 10, 2024

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

from graspologic.

daxpryce avatar daxpryce commented on June 10, 2024

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?

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?

throw imports inside of functions maybe? makes those functions take "longer" to run, but shorter for anybody who just wants to import the package

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.

from graspologic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.