jina-ai / serve

☁️ Build multimodal AI applications with cloud-native stack
https://jina.ai/serve
Apache License 2.0
21.13k stars 2.22k forks source link

TypeError('zip argument #2 must support iteration') #1684

Closed yiouyou closed 3 years ago

yiouyou commented 3 years ago

Describe the bug

Here is what I've done to modify the "jina-wikipedia-sentences" example, and try to apply it from English to Chinese:

  1. Change the requirements.txt to add paddlehub and paddlepaddle

    jina[devel,torch,hub]==0.9.0
    transformers==3.5.1
    kaggle==1.5.10
    paddlehub==1.7.1
    paddlepaddle==1.8.5
  2. Change encode.yml to TextPaddlehubEncoder, and try to choose chinese-roberta-wwm-ext-large model

    !TextPaddlehubEncoder
    with:
    model_name: chinese-roberta-wwm-ext-large
  3. Prepared some Chinese text data

    [zh-input_20.txt](https://github.com/jina-ai/jina-hub/files/5810429/zh-input_20.txt)
  4. 'python app.py index' is done successfully

  5. However, 'python app.py search' meets some error when search some Chinese words in example.html:

image

Any idea why?

Thanks! Describe how you solve it


Environment

Screenshots

JoanFM commented 3 years ago

Describe the bug

Here is what I've done to modify the "jina-wikipedia-sentences" example, and try to apply it from English to Chinese:

  1. Change the requirements.txt to add paddlehub and paddlepaddle
jina[devel,torch,hub]==0.9.0
transformers==3.5.1
kaggle==1.5.10
paddlehub==1.7.1
paddlepaddle==1.8.5
  1. Change encode.yml to TextPaddlehubEncoder, and try to choose chinese-roberta-wwm-ext-large model
!TextPaddlehubEncoder
with:
  model_name: chinese-roberta-wwm-ext-large
  1. Prepared some Chinese text data
[zh-input_20.txt](https://github.com/jina-ai/jina-hub/files/5810429/zh-input_20.txt)
  1. 'python app.py index' is done successfully
  2. However, 'python app.py search' meets some error when search some Chinese words in example.html:

image

Any idea why?

Thanks! Describe how you solve it

Environment

Screenshots

Hey @yiouyou , can u try if this also happens with version 0.9.13?

JoanFM commented 3 years ago

Hey @yiouyou , can you let me know how many documents you are indexing and how many shards are you using?

yiouyou commented 3 years ago

The problem seems go way by adding more documents.

JoanFM commented 3 years ago

The problem seems go way by adding more documents.

Even with the small amount of documents #1689 should have fixed this, you are welcome to try with the latest version

yiouyou commented 3 years ago

With jina 0.9.16, "TypeError('zip argument #2 must support iteration')" goes away. To avoid empty shard, I'm using 400 song's lyrics now. But still has some problems to get chinese search done. The fresh detail steps are listed in https://github.com/jina-ai/examples/issues/350