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

Support progressive rendering #1489

Merged
merged 25 commits into from
Oct 15, 2024
Merged

Conversation

trungleduc
Copy link
Member

@trungleduc trungleduc commented Sep 17, 2024

Fix #634

User-facing changes

voila3.mp4
  • New CLI option --progressive_rendering to activate the progressive rendering mode
voila ... --progressive_rendering=True
  • The dashboard appears immediately, with placeholders filling the cell outputs. These outputs are updated as the kernel executes each cell.
  • --progressive_rendering and --preheat_kernel are incompatible.

Code changes

In progressive rendering mode:

  • New Websocket handler is added at /voila/execution to receive execution request from the frontend and return the cell outputs.
  • nbconvert does not execute notebooks anymore. The frontend will render the dashboard immediately, then it sends an execution request to the above Websocket endpoint.
  • On Websocket response, the frontend receives cell output and its index, then OutputArea widgets are created at the corresponding cell to render the outputs.
  • execute_input messages are filtered

Backwards-incompatible changes

N/A

Copy link
Contributor

Binder 👈 Launch a Binder on branch trungleduc/voila/voicify

@trungleduc trungleduc added the enhancement New feature or request label Sep 27, 2024
@trungleduc trungleduc force-pushed the voicify branch 9 times, most recently from 04d1ecd to 1fc480b Compare October 3, 2024 14:46
@trungleduc trungleduc marked this pull request as ready for review October 4, 2024 09:54
@trungleduc trungleduc requested review from martinRenou and jtpio and removed request for martinRenou October 4, 2024 09:54
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about the tree snapshots changes, do you why it shows these changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah me too. Something may have changed in the file browser package? I will check tomorrow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the previous snapshot was supposed to be the JupyterLab file browser, since it's the default now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, both the old and new snapshots are using JupyterLab file browser.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just pushed a couple of commits to disable the progressive rendering feature when jupyter-server 1 is installed.

Apart from the changes in the ui-tests that I'm confused about, that looks good to me!

@trungleduc
Copy link
Member Author

Failed tests in python 3.8 are not related. Python 3.8 is end-of-life already https://devguide.python.org/versions/#python-release-cycle. Let's remove 3.8 and add 3.12 to the matrix in a follow-up PR?

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@martinRenou martinRenou merged commit f8dd6a5 into voila-dashboards:main Oct 15, 2024
25 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Widget loading indicator
3 participants