feat: type implement protobuf#806
Merged
Merged
Conversation
cef7c45 to
c0430fd
Compare
c0430fd to
5461812
Compare
Member
|
@dongxiang123 could you make sure that all the pre-commit "things" (lack, ruff, mypy, etc) are applied? |
JohannesMessner
requested changes
Nov 17, 2022
ce61c4d to
7bb5d25
Compare
251d16b to
75c87db
Compare
samsja
reviewed
Nov 21, 2022
* refactor(v2): renamed variable and files Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr> * refactor(v2): renamd test Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr> Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr> feat: add read from proto
3771efd to
26aae10
Compare
JohannesMessner
approved these changes
Nov 21, 2022
dongxiang123
added a commit
that referenced
this pull request
Nov 21, 2022
* refactor(v2): renamed variable and files Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr> * refactor(v2): renamd test Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr> Signed-off-by: Sami Jaghouar <sami.jaghouar@hotmail.fr> feat: add read from proto Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goals:
Atm the docarray types implement _to_nested_item_protobuf. Which basically dump the types into the correct proto object. This allow the to_protobuf method of Document to be quite short. We need to do the same for the from_protobuf
Therefore at the BaseNode interface we need to implement a _from_nested_item_protobuf which take a proto message as input initialize the node. Document, DocumentArray, and Types (all of the possible nodes) should define this method. For Document and DocumentArray this is quite straightforward. For Types we basically need to break the if statement from from_protobuf into each of the type.