GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — feat: nested attribute access in `find()` by anna-charlotte · Pull Request #1176 · docarray/docarray
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Conversation
Contributor
Goals: Example: class InnerDoc(BaseDocument): title: str embedding: NdArray class MyDoc(BaseDocument): inner: InnerDoc query = MyDoc(inner=InnerDoc(title='query', embedding=np.random.randn((10)))) index = DocumentArray[MyDoc]( [ MyDoc(inner=InnerDoc(title=f'doc {i}', embedding=np.random.randn((10)))) for i in range(10) ] ) top_k, scores = find( index, query, embedding_field='inner__embedding', # <----------- access path for nested access limit=7, )
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
samsja
reviewed
Uh oh!
There was an error while loading. Please reload this page.
Member
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. not sure to understand why it is
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
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. For DocumentArray stacked, the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
JohannesMessner
suggested changes
Member
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.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
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. applied!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsSigned-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: anna-charlotte <[email protected]>
anna-charlotte
force-pushed
the
feat-find-nested-access
branch
from
68af091 to
8400ed4
Compare
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
samsja
approved these changes
JohannesMessner
approved these changes
AsRaNi1
pushed a commit
to AsRaNi1/docarray
that referenced
this pull request
* test: add test for find on nested attribute Signed-off-by: anna-charlotte <[email protected]> * test: add test for nested attr in stacked da Signed-off-by: anna-charlotte <[email protected]> * fix: nested access Signed-off-by: anna-charlotte <[email protected]> * fix: mypy Signed-off-by: anna-charlotte <[email protected]> * fix: field type by access path for da Signed-off-by: anna-charlotte <[email protected]> * fix: clean up Signed-off-by: anna-charlotte <[email protected]> * fix: move get field type by access path Signed-off-by: anna-charlotte <[email protected]> * fix: imports Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestion and fix import Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestions Signed-off-by: anna-charlotte <[email protected]> --------- Signed-off-by: anna-charlotte <[email protected]> Signed-off-by: Arnav Zutshi <[email protected]>
Jackmin801
pushed a commit
that referenced
this pull request
* test: add test for find on nested attribute Signed-off-by: anna-charlotte <[email protected]> * test: add test for nested attr in stacked da Signed-off-by: anna-charlotte <[email protected]> * fix: nested access Signed-off-by: anna-charlotte <[email protected]> * fix: mypy Signed-off-by: anna-charlotte <[email protected]> * fix: field type by access path for da Signed-off-by: anna-charlotte <[email protected]> * fix: clean up Signed-off-by: anna-charlotte <[email protected]> * fix: move get field type by access path Signed-off-by: anna-charlotte <[email protected]> * fix: imports Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestion and fix import Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestions Signed-off-by: anna-charlotte <[email protected]> --------- Signed-off-by: anna-charlotte <[email protected]>
Jackmin801
pushed a commit
that referenced
this pull request
* test: add test for find on nested attribute Signed-off-by: anna-charlotte <[email protected]> * test: add test for nested attr in stacked da Signed-off-by: anna-charlotte <[email protected]> * fix: nested access Signed-off-by: anna-charlotte <[email protected]> * fix: mypy Signed-off-by: anna-charlotte <[email protected]> * fix: field type by access path for da Signed-off-by: anna-charlotte <[email protected]> * fix: clean up Signed-off-by: anna-charlotte <[email protected]> * fix: move get field type by access path Signed-off-by: anna-charlotte <[email protected]> * fix: imports Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestion and fix import Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestion from code review Signed-off-by: anna-charlotte <[email protected]> * fix: apply suggestions Signed-off-by: anna-charlotte <[email protected]> --------- Signed-off-by: anna-charlotte <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Reviewers2 more reviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabelsProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | |||||||||||||||||||||||||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |