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

Can you stream the output as the notebook is evaluating? #301

Open
kapily opened this issue May 29, 2023 · 1 comment
Open

Can you stream the output as the notebook is evaluating? #301

kapily opened this issue May 29, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kapily
Copy link
Contributor

kapily commented May 29, 2023

Currently, the output only displays after the entire notebook evaluates. However, you may have some computationally expensive cells. From a UI/UX perspective, it would be helpful to see the results get stream as they are available

@pplonski
Copy link
Contributor

Hi @kapily,

Mercury is using execnb for executing cells code. The execnb is waiting for final cell response. We collect all cell's responses and then convert them to HTML with nbconvert Python API.

For sure it can be done in the different way, for example communicate with Python kernel directly, using ZeroMQ and rendering HTML directly in the frontend based on responses from kernel. But right now I don't have time to dig into it.

For me priorities are:

  1. Make framework simple to use.
  2. Make it simple to deploy (and share notebooks with non-technical users).
  3. Make framework fast.

Maybe the easiest way to implement streams might be to look how to capture streams in execnb, and then find a way to construct HTML for single cell.

@pplonski pplonski added enhancement New feature or request help wanted Extra attention is needed labels May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants