From 47385646c086ee96e13be6b9ca5dfc74153f2863 Mon Sep 17 00:00:00 2001 From: Matthew Printz Date: Fri, 14 Jul 2023 15:04:38 -0400 Subject: [PATCH] Fix to allow grouping (again) --- llmkernel/kernel.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/llmkernel/kernel.py b/llmkernel/kernel.py index d4ba405..aa80572 100644 --- a/llmkernel/kernel.py +++ b/llmkernel/kernel.py @@ -180,6 +180,17 @@ async def load_dataset(self, queue, message_id, message, **kwargs): f"""{var_name};""" ) + def _publish_execute_input(self, code, parent, execution_count): + """Publish the code request on the iopub stream.""" + # Override the default action to pass along the parent metadata so we can track the container + self.session.send( + self.iopub_socket, + "execute_input", + {"code": code, "execution_count": execution_count}, + parent=parent, + ident=self._topic("execute_input"), + metadata=parent.get("metadata", None), + ) async def load_mira_model(self, queue, message_id, message, **kwargs): content = message.get('content', {})