milvus-io / bootcamp

Dealing with all unstructured data, such as reverse image search, audio search, molecular search, video analysis, question and answer systems, NLP, etc.
https://milvus.io
Apache License 2.0
1.81k stars 555 forks source link

question_answering_system/server connect milvus timeout #1163

Open yuhaowin opened 1 year ago

yuhaowin commented 1 year ago
    from towhee import ops, pipe
  File "/usr/local/lib/python3.10/site-packages/towhee/__init__.py", line 20, in <module>
    from towhee.runtime import register, pipe, ops, accelerate, AutoConfig, AutoPipes
  File "/usr/local/lib/python3.10/site-packages/towhee/runtime/__init__.py", line 17, in <module>
    from .pipeline import Pipeline as pipe
  File "/usr/local/lib/python3.10/site-packages/towhee/runtime/pipeline.py", line 18, in <module>
    from towhee.runtime.check_utils import TupleForm
  File "/usr/local/lib/python3.10/site-packages/towhee/runtime/check_utils.py", line 36, in <module>
    class TupleForm(BaseModel):
  File "/usr/local/lib/python3.10/site-packages/towhee/runtime/check_utils.py", line 38, in TupleForm
    schema_data: Optional[Tuple[constr(regex='^[a-z][a-z0-9_]*$'), ...]]
TypeError: constr() got an unexpected keyword argument 'regex'

I figured out this exception,and maybe we should update towhee. https://github.com/towhee-io/towhee/issues/2612 https://github.com/towhee-io/towhee/issues/2610

https://github.com/milvus-io/bootcamp/blob/ac948034bb6e547875fcf56b312feabca3883e47/solutions/nlp/question_answering_system/server/requirements.txt#L5-L6

 towhee==1.1.1 
 towhee.models==1.1.1 
shiyu22 commented 1 year ago

When you installed the towhee1.1.1, the issue was solved, right? I think it was caused by the version of pydantic, and 1.1.1 is required pydantic<2. And can you submit a PR to update the version, and thanks for your exploration.