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

python -m clip_server timeout #835

Closed big-thousand closed 1 year ago

big-thousand commented 2 years ago
image
jtype: Flow
version: '1'
with:
  port: 51000
  #monitoring: True
  #port_monitoring: 9090
executors:
  - name: clip_t
    uses:
      jtype: CLIPEncoder
      with:
        #device: cpu
        name: M-CLIP/XLM-Roberta-Large-Vit-L-14
      metas:
        py_modules:
          - clip_server.executors.clip_torch
ZiniuYu commented 2 years ago

Hi @big-thousand

Notice that if you do not specify timeout_ready in the YAML file, it will adapt the default value of 10 min. Several possible reasons may cause you to get timeout errors:

Anyway, you can increase the timeout limit by setting the timeout_ready in the YAML file. Or you could try to use a smaller model. For example, to have a longer timeout at 30 min, you can use:

jtype: Flow
version: '1'
with:
  port: 51000
executors:
  - name: clip_t
    uses:
      jtype: CLIPEncoder
      timeout_ready: 1800000
      with:
        name: M-CLIP/XLM-Roberta-Large-Vit-L-14
      metas:
        py_modules:
          - clip_server.executors.clip_torch