-
Notifications
You must be signed in to change notification settings - Fork 42
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
Streaming protocol #250
Streaming protocol #250
Changes from all commits
54bf39a
c918454
95406ae
5e3d764
7fb92bf
c50a295
bba6d7d
490828a
efca9d2
5a7f595
7bfd978
078e079
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
if TYPE_CHECKING: | ||
from ..models.mixins import RemoteableMixin | ||
from ..models.NNsightModel import NNsight | ||
from ..tracing.Node import Node | ||
|
||
|
||
class Tracer(GraphBasedContext, RemoteMixin, BridgeMixin, EditMixin): | ||
|
@@ -179,6 +180,9 @@ def remote_backend_handle_result_value(self, value: Dict[str, Any]) -> None: | |
# TODO : graph mismatch handle. hash json ? | ||
for node_name, node_value in value.items(): | ||
self.graph.nodes[node_name]._value = node_value | ||
|
||
def remote_backend_get_stream_node(self, name: str, graph_id: str) -> "Node": | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I get that the function name provides context for when the function is called (and perhaps the only actual usecase), but why not use a more general name, like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I see, it overwrites the function signature in |
||
return self.graph.nodes[name] | ||
|
||
def remote_backend_cleanup(self): | ||
|
||
|
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.
I see this pattern defined in numerous locations (
__init__.py
,GraphBasedContext.py
). Do you think this could be reused as autil
function (with a descriptive docstring)?