Skip to content
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

Run Explain tasks in background after training finishes #26

Open
ledell opened this issue Jul 13, 2022 · 1 comment
Open

Run Explain tasks in background after training finishes #26

ledell opened this issue Jul 13, 2022 · 1 comment
Labels
type/improvement Improvement to the code

Comments

@ledell
Copy link
Contributor

ledell commented Jul 13, 2022

To avoid the computational delay, let's start the explain tasks immediately after the training finishes using Background Tasks. Then we can store the data/images in the app so they will be ready to serve by the time the user clicks on the Explain tabs. We will just store the default model images for Model Explain and generate the other ones on-demand.

Useful blog: https://medium.com/@unusualcode/background-jobs-in-wave-or-how-not-to-kill-your-ui-ae1fed95693a

@ledell ledell added the type/improvement Improvement to the code label Jul 20, 2022
@ledell
Copy link
Contributor Author

ledell commented Aug 1, 2022

Per @sebhrusen recommendation, consider: https://docs.python.org/3/library/asyncio-future.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/improvement Improvement to the code
Projects
None yet
Development

No branches or pull requests

1 participant