You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the startup time of the application is 5 seconds on a powerful machine, which feels very sluggish. This is due to the fact that most imports are at the top of each file, so things like torch, timm, numpy, scipy, and other heavyweight python modules are all loaded before the user gets any visual feedback.
This could be improved by using local imports and delaying the initialization of things like models until they are needed. The idea is that on program startup we don't need to have a model loaded until the user actually wants to compute embeddings, and even then, the loading of that model could be done asynchronously so the user can interact with the dataset while the model is loading in the background. Unfortunately, this does make using type annotations a bit tricker, but it can be done with things like typing.TYPE_CHECKING.
Overall this is a minor issue, but I wanted to raise it now given that if there was a desire to address it it would take a non-trivial amount of code restructuring.
The text was updated successfully, but these errors were encountered:
Startup time is a problem. Thanks for the guidance.
Another wrinkle: we compute embeddings automatily at the start and the GUI does not load untill done. This can take a while, ~70 seconds, with 500 shitspotter sized images.
Currently the startup time of the application is 5 seconds on a powerful machine, which feels very sluggish. This is due to the fact that most imports are at the top of each file, so things like torch, timm, numpy, scipy, and other heavyweight python modules are all loaded before the user gets any visual feedback.
This could be improved by using local imports and delaying the initialization of things like models until they are needed. The idea is that on program startup we don't need to have a model loaded until the user actually wants to compute embeddings, and even then, the loading of that model could be done asynchronously so the user can interact with the dataset while the model is loading in the background. Unfortunately, this does make using type annotations a bit tricker, but it can be done with things like
typing.TYPE_CHECKING
.Overall this is a minor issue, but I wanted to raise it now given that if there was a desire to address it it would take a non-trivial amount of code restructuring.
The text was updated successfully, but these errors were encountered: