Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiniuYu committed Sep 16, 2022
1 parent 2697488 commit f4ee3a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client/clip_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,9 @@ def rank(

return results

async def arank(self, docs: Iterable['Document'], **kwargs) -> 'DocumentArray':
async def arank(
self, docs: Union['DocumentArray', Iterable['Document']], **kwargs
) -> 'DocumentArray':
from rich import filesize

if hasattr(docs, '__len__') and len(docs) == 0:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def test_docarray_inputs(make_flow, inputs):
@pytest.mark.asyncio
async def test_async_arank(make_flow, inputs):
c = Client(server=f'grpc://0.0.0.0:{make_flow.port}')
r = await c.arank(inputs)
r = await c.arank(inputs if not callable(inputs) else inputs())
assert '__loaded_by_CAS__' not in r[0].tags
assert not r[0].blob
assert not r[0].tensor
Expand Down

0 comments on commit f4ee3a2

Please sign in to comment.