Skip to content

change return type of find_batched() utility function #1310

@JohannesMessner

Description

@JohannesMessner

Currently, find_batched() has the following signature:

def find_batched(
    ...
) -> List[FindResult]:

In order to align with DocumentIndex, it should be switched to:

def find_batched(
    ...
) -> FindResultBatched:

TODOs:

  • move the definition of FindResultBatched from index/abstract.py to utils/find.py
  • change the signature as described above
  • fix the imports on all Document Index classes
  • Probably FindResultBatched needs a tweak as well: scores: np.ndarray probably needs to be changed to allow a union of ndarray, torch.Tensor and tf.Tensor

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocArray v2This issue is part of the rewrite; not to be merged into maingood-first-issueSuitable as your first contribution to DocArray!

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions