jina-ai / clip-as-service

🏄 Scalable embedding, reasoning, ranking for images and sentences with CLIP
https://clip-as-service.jina.ai
Other
12.48k stars 2.07k forks source link

fix: check if results are empty #881

Closed alaeddine-13 closed 1 year ago

alaeddine-13 commented 1 year ago

Fixing encoding of a dataset using cas. To reproduce: download this file https://jinaai.slack.com/files/U026WRMRL6A/F04GE6JKX0U/dataset.csv

then:

from docarray import DocumentArray, Document
with open('dataset.csv') as fp:
  da = DocumentArray.from_csv(fp)

from clip_client import Client

c = Client(
    'grpcs://api.clip.jina.ai:2096', credential={'Authorization': 'atuh-token'}
)

encoded_da = c.encode(da, show_progress=True)
alaeddine-13 commented 1 year ago

now a server side issue happens:

    raise _create_rpc_error(await self.initial_metadata(), await
grpc.aio._call.AioRpcError: <AioRpcError of RPC that terminated with:
    status = StatusCode.UNAVAILABLE
    details = "HTTP Balancer service in fail-fast |Gateway: Communication error with deployment clip_t at address(es) {'clip-t.grpc-flow.svc:8080'}. Head or worker(s) may be down."
    debug_error_string = "{"created":"@1671719158.543427000","description":"Error received from peer ipv4:52.58.81.82:2096","file":"src/core/lib/surface/call.cc","file_line":967,"grpc_message":"HTTP Balancer service in fail-fast |Gateway: Communication error with deployment clip_t at address(es) {'clip-t.grpc-flow.svc:8080'}. Head or worker(s) may be down.","grpc_status":14}"
ZiniuYu commented 1 year ago

closing it since it's a connection issue