Merged
Conversation
Signed-off-by: Sami Jaghouar <[email protected]>
Signed-off-by: Sami Jaghouar <[email protected]>
Signed-off-by: Sami Jaghouar <[email protected]>
Signed-off-by: Sami Jaghouar <[email protected]>
Jackmin801
reviewed
Jan 18, 2023
Contributor
|
Other than that LGTM |
Contributor
|
Nice, I like it, I think we can remove most of the |
| from docarray.computation.numpy_backend import NumpyCompBackend | ||
|
|
||
| return NumpyCompBackend | ||
| return NumpyCompBackend() |
Member
There was a problem hiding this comment.
Is it a bit of an anti pattern to crate all of these instances if we don't really need them? would it make sense to maintain a singleton instance?
Contributor
There was a problem hiding this comment.
Oh that is a good idea actually. I support this. Lets go singleton with this.
Member
Author
There was a problem hiding this comment.
actually doing the singleton is not that trivial in python ... I think it adds complexity for few real advantages at the end. Only conceptual advantage.
|
📝 Docs are deployed on https://ft-refactor-comp-backend--jina-docs.netlify.app 🎉 |
JohannesMessner
approved these changes
Jan 18, 2023
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.
Context
Because of some type problem we need multiples times in the codebase to duplicate function definition in the Computional Backend part.
This PR fix this by doing a refactoring on the type part. The new one is less precise and correct that before but more flexible and easier to maintain.
Main difference are two folds: