I noticed that it takes about 4-5 seconds to import hamilton's Builder:
from hamilton.driver import Builder
The rest of the package imports are instant.
Does this make sense?
(I'm using VSCode notebooks and the latest hamilton 1.72.1)
s
Stefan Krawczyk
07/23/2024, 1:54 PM
It would be the module imports within
driver
Stefan Krawczyk
07/23/2024, 1:55 PM
Likely the plugins module because you might have a lot of dependencies installed in your environment that Hamilton is loading materializers for?
Stefan Krawczyk
07/23/2024, 1:55 PM
I think we can optimize this though.
g
Gilad Rubin
07/23/2024, 2:01 PM
I don't know for sure 🙂 Is there a way for me to check that?
Yes, it seems to be too slow for apps/models that need to run relatively fast
r
Ryan Whitten
07/23/2024, 2:15 PM
Not sure about within a notebook, but I've used tuna to profile imports. Usually pandas & numpy are pretty slow