| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| emb = embedding_type._docarray_stack(emb_list) | ||
| elif isinstance(data, DocumentArrayStacked): | ||
| emb = getattr(data, embedding_field) | ||
| emb = next(AnyDocumentArray._traverse(data, embedding_field)) |
There was a problem hiding this comment.
not sure to understand why it is next here
Sorry, something went wrong.
There was a problem hiding this comment.
For DocumentArray stacked, the _traverse will yield one stacked tensor, by calling next() on it, I want to get that one tensor. I think this would be the same as calling list(AnyDocumentArray._traverse(data, embedding_field))[0].
Sorry, something went wrong.
|
|
||
| def _get_field_type_by_access_path( | ||
| doc_type: Type['BaseDocument'], access_path: str | ||
| ) -> Any: |
There was a problem hiding this comment.
-> Optional[Type]?
Sorry, something went wrong.
There was a problem hiding this comment.
applied!
Sorry, something went wrong.
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
|
📝 Docs are deployed on https://ft-feat-find-nested-access--jina-docs.netlify.app 🎉 |
Sorry, something went wrong.
* test: add test for find on nested attribute Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * test: add test for nested attr in stacked da Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: nested access Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: mypy Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: field type by access path for da Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: clean up Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: move get field type by access path Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: imports Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestion and fix import Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestions Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> --------- Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> Signed-off-by: Arnav Zutshi <arnzut1324@gmail.com>
* test: add test for find on nested attribute Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * test: add test for nested attr in stacked da Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: nested access Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: mypy Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: field type by access path for da Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: clean up Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: move get field type by access path Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: imports Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestion and fix import Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestions Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> --------- Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: add test for find on nested attribute Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * test: add test for nested attr in stacked da Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: nested access Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: mypy Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: field type by access path for da Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: clean up Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: move get field type by access path Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: imports Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestion and fix import Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> * fix: apply suggestions Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai> --------- Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
| Back | FazBrowse Home | New Git URL |
Goals:
allow nested attribute access in find(), which currently isn't supported yet. Nested access will be possible by '__'-separated access paths.
Example: