opea-project / GenAIComps

GenAI components at micro-service level; GenAI service composer to create mega-service
Apache License 2.0
44 stars 98 forks source link

Module dependency version differences #574

Open eero-t opened 2 weeks ago

eero-t commented 2 weeks ago

(This is continuation / expansion of #112 which was closed without any explanation.)

Looking at the latest main branch code...

For some components, there are different dependency versions listed in requirements.txt files:

$ find -name requirements.txt | xargs grep -h == | sort -u
frontend==0.0.3
haystack-ai==2.2.4
huggingface_hub==0.24.0
langchain #==0.1.12
langchain==0.1.16
langchain==0.2.12
langchain==0.2.9
langchain-community==0.2.1
langchain_community==0.2.5
langchain_community==0.2.7
langchain-core==0.2.21
langchainhub==0.1.20
llama-index-embeddings-huggingface==0.2.0
lm-eval==0.4.2
motor==3.4.0
openai==1.35.13
pgvector==0.2.5
prometheus-fastapi-instrumentator==7.0.0
pydantic #==1.10.13
pydantic==2.7.2
pydantic==2.7.3
pydantic==2.8.2
pymilvus==2.4.3
pymupdf==1.24.5
python-bidi==0.4.2
python-docx==0.8.11
sentence-transformers==3.0.1
torch==1.13.1 --index-url https://download.pytorch.org/whl/cpu
torchaudio==0.13.1 --index-url https://download.pytorch.org/whl/cpu
torchvision==0.14.1 --index-url https://download.pytorch.org/whl/cpu
unstructured[all-docs]==0.11.5

Both for langchain and langchain_community:

$ find -name requirements.txt | xargs grep langchain.*==
./comps/agent/langchain/requirements.txt:langchain==0.2.9
./comps/agent/langchain/requirements.txt:langchain_community==0.2.7
./comps/agent/langchain/requirements.txt:langchainhub==0.1.20
./comps/knowledgegraphs/requirements.txt:langchain_community==0.2.5
./comps/ragas/tgi/requirements.txt:langchain==0.1.16
./comps/dataprep/redis/langchain/requirements.txt:langchain==0.2.12
./comps/llms/faq-generation/tgi/requirements.txt:langchain==0.1.16
./comps/llms/text-generation/vllm/requirements.txt:langchain==0.1.16
./comps/llms/text-generation/ollama/requirements.txt:langchain==0.1.16
./comps/llms/text-generation/ray_serve/requirements.txt:langchain==0.1.16
./comps/llms/text-generation/vllm-ray/requirements.txt:langchain==0.1.16
./comps/llms/text-generation/vllm-xft/requirements.txt:langchain==0.1.16
./comps/llms/summarization/tgi/requirements.txt:langchain #==0.1.12
./comps/llms/requirements.txt:langchain==0.1.16
./comps/lvms/video-llama/server/requirements.txt:langchain==0.2.9
./comps/lvms/video-llama/server/requirements.txt:langchain-community==0.2.1
./comps/lvms/video-llama/server/requirements.txt:langchain-core==0.2.21

And pydantic:

$ find -name requirements.txt | xargs grep pydantic.*==
./comps/retrievers/langchain/milvus/requirements.txt:pydantic==2.7.3
./comps/agent/langchain/requirements.txt:pydantic #==1.10.13
./comps/asr/requirements.txt:pydantic==2.7.2
./comps/finetuning/requirements.txt:pydantic==2.8.2
./comps/llms/utils/lm-eval/requirements.txt:pydantic==2.7.2
./comps/lvms/requirements.txt:pydantic==2.7.2

Is this intentional, or just a bug?

eero-t commented 2 weeks ago

This is somewhat related to #265.

wangkl2 commented 2 weeks ago

@eero-t Thanks for reporting this. Currently the new examples are enabled gradually and keep added to new releases, each of the examples might be based on different base library versions during developing and evolving due to different time frame. The Docker images are separate for all use cases. And we try to make sure each of the examples works.

@kevinintel Do we have plans to align all the versions of the common dependencies for all examples, such as langchain, langchain-community and pydantic?