-
Notifications
You must be signed in to change notification settings - Fork 40
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
[Notebooks] Types for modal-kernelshim to publish outputs #2764
Conversation
This allows the server to get outputs from running cells in modal-kernelshim.
modal_proto/api.proto
Outdated
// See kernelshim.py for the differences between this and `ExecuteResult`. | ||
// https://jupyter-client.readthedocs.io/en/stable/messaging.html#execution-results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't committed yet, here's an explanation
# The reply is not returned until after the cell finishes running. Although the
# `execute_result` output message contains the execution count and status, this is only
# returned by ipykernel if the last line of the cell evaluates to a non-null value.
#
# So, we still need to send this message to the server to get the true execution count
# for cells that do not produce an `execute_result` message.
reply = await pending
@prbot approve Merging for now, still looking forward to feedback though! We discussed a bit in the office already. And after this we'll probably need to iterate further still. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved 👍. @luiscape will follow-up review this.
@prbot approve Merging for now, still looking forward to feedback though! We discussed a bit in the office already. And after this we'll probably need to iterate further still. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved 👍. @mwaskom will follow-up review this.
This allows the server to get outputs from running cells in modal-kernelshim.
Reference: https://jupyter-client.readthedocs.io/en/stable/messaging.html
Describe your changes
Why is this public protobuf? It's in here because kernelshim exists within the sandbox running user code. It can't access public information.
Why is this re-encoded in this funny way? It's part of the technical design that will allow us to implement collaborative editing and cloud-based kernels. (Also, on the server side, we'll need to figure out how to store potentially large outputs, possibly separate from other outputs.)
How will this be authenticated? Using an authentication passed into the sandbox. We could use task_id / task_secret, except sandboxes don't have that, so probably something else.
Notebook progress
Map of current progress. This PR is the yellow part.