-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
Try to pass cell id to executing kernel. #886
Conversation
I'm addressing the CI failures in #887 |
Kicking CI |
Other side of ipython/ipykernel#886 half of ipython#13579
I am not sure about this. Wouldn't it be some kind of abstraction leak? |
IMHO that ship has sailed, this info is already sent as part of the execute
request from front end to here, and is already used by other kernels. The
goal is also to help having a mapping from execution/limiting to original
cell.
I agree that kernel should be able to work without, but I also don’t see
any reason to prevent it.
…On Wed, Mar 23, 2022 at 10:42 AM Sylvain Corlay ***@***.***> wrote:
I am not sure about this. Wouldn't it be some kind of abstraction leak?
—
Reply to this email directly, view it on GitHub
<#886 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACR5T4EBDQ76OEXPXAMEBTVBLRO3ANCNFSM5RLCS6HA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
OK, LGTM. |
I assume we can't add a test for this until |
I should probably add some test that subclasses/methods that both do and do not support gettign cell_id behave properly. I'll try to do that at least. |
Is seem that few kernel want to make use of cell id for various reasons. One way to get the cell_id in the executing context is to make use of init_metadata but it is marked for removal. for example in [there](https://github.com/robots-from-jupyter/robotkernel/blob/19b28267406d1f8555ce73b96e7efb8af8417266/src/robotkernel/kernel.py#L196-L205) Another is to start passing cell_id down. This is technically a change of API as our consumer may not support more parameters so we take a peak at the signature, and pass cell_id only if it is : - an explicit parameter, - the function/method takes varkwargs. We could also start to refactor to pass a metadata object with multiple fields if this is the preferred route. One questions is whether and how we want to deprecated not receiving cell_id as a parameter. Related to ipython/ipython#13579 and subsequent PR on IPython side to support cell_id in progress.
for more information, see https://pre-commit.ci
The remaining failure has been fixed downstream in ipyparallel. |
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.
Thanks!
Thanks ! |
Other side of ipython/ipykernel#886 half of ipython#13579
Is seem that few kernel want to make use of cell id for various
reasons.
One way to get the cell_id in the executing context is to make use of
init_metadata but it is marked for removal.
for example in there
Another is to start passing cell_id down.
This is technically a change of API as our consumer may not support more
parameters so we take a peak at the signature, and pass cell_id only if
it is :
We could also start to refactor to pass a metadata object with multiple
fields if this is the preferred route.
One questions is whether and how we want to deprecated not receiving
cell_id as a parameter.
Related to ipython/ipython#13579 and
subsequent PR on IPython side to support cell_id in progress.