-
Notifications
You must be signed in to change notification settings - Fork 262
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
Replace Json with Pickle Serialization #472
Conversation
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.
Please check the comments. Overall LGTM
} | ||
return json.dumps(obj, cls=BatchEncoder) | ||
def serialize(self): | ||
obj = {"frames": self._frames, "batch_size": len(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.
What is the usage for batch_size
? Can we return PickleSerializer.serialize(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.
For cases where we omit some rows, at least batch_size tells the row count
eva/server/networking_utils.py
Outdated
@@ -79,3 +81,10 @@ def set_socket_io_timeouts(transport, seconds, useconds=0): | |||
return True | |||
except OSError: | |||
return False | |||
|
|||
|
|||
def serialize_message(message: str): |
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.
Shall we use typing.Any
for the type hint of message
?
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.
Done
display.pprint_nest_depth
of ndarray objects in batch