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
Is your feature request related to a problem? Please describe.
Problem: display a "loading..." indicator (or better, a progress bar) while some long in-process computation is running.
There are 3 main reasons why in-process background callbacks are desirable:
Current version of background callbacks requires changes to the deployment environment, they don't work out of the box after pip install dash.
Updating an in-process cache. Having to set up Redis or a database or use files for caching graphs in a simple single-process app is an overkill.
Especially, when results inserted to the in-process cache are non-serializable, such as memory-mapped numpy arrays or pytorch tensors or models which might be on CUDA. Or simply any data structure that doesn't implement serialization.
Describe the solution you'd like
An callback manager (say InProcessManager) that is available after pip instal dash and runs background callbacks in a thread in the same process.
Describe alternatives you've considered
Currently I am using regular callbacks, but have run into #2486 when trying to show loading indicator for the callback. Also, progress bar is not available for regular callbacks, and background callbacks seem to be more natural for this kind of use-case.
The text was updated successfully, but these errors were encountered:
gvwilson
changed the title
[Feature Request] Allow background callbacks to run in the same process as the main app
Allow background callbacks to run in the same process as the main app
Aug 13, 2024
Is your feature request related to a problem? Please describe.
Problem: display a "loading..." indicator (or better, a progress bar) while some long in-process computation is running.
There are 3 main reasons why in-process background callbacks are desirable:
pip install dash
.Describe the solution you'd like
An callback manager (say
InProcessManager
) that is available afterpip instal dash
and runs background callbacks in a thread in the same process.Describe alternatives you've considered
Currently I am using regular callbacks, but have run into #2486 when trying to show loading indicator for the callback. Also, progress bar is not available for regular callbacks, and background callbacks seem to be more natural for this kind of use-case.
The text was updated successfully, but these errors were encountered: