From 163e2b099c6713c9a91503f118e8e044f43d814a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 15 Jun 2024 05:23:33 +0000 Subject: [PATCH 1/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- comps/dataprep/milvus/prepare_doc_milvus.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/comps/dataprep/milvus/prepare_doc_milvus.py b/comps/dataprep/milvus/prepare_doc_milvus.py index aa9404bed..2f7068712 100644 --- a/comps/dataprep/milvus/prepare_doc_milvus.py +++ b/comps/dataprep/milvus/prepare_doc_milvus.py @@ -13,10 +13,11 @@ from comps.cores.proto.docarray import DocPath from comps.cores.telemetry.opea_telemetry import opea_telemetry from comps.dataprep.utils import document_loader -#current_script_path = os.path.dirname(os.path.abspath(__file__)) -#parent_dir = os.path.dirname(current_script_path) -#sys.path.append(parent_dir) -#from utils import document_loader + +# current_script_path = os.path.dirname(os.path.abspath(__file__)) +# parent_dir = os.path.dirname(current_script_path) +# sys.path.append(parent_dir) +# from utils import document_loader @register_microservice( From f84decceca9769380b0b49f03d24ef6a225d765a Mon Sep 17 00:00:00 2001 From: jinjunzh Date: Sat, 15 Jun 2024 13:40:40 -0400 Subject: [PATCH 2/3] fixed milvus port conflict issues during deployment --- comps/dataprep/milvus/prepare_doc_milvus.py | 10 +++++----- comps/retrievers/langchain/milvus/retriever_milvus.py | 2 +- comps/vectorstores/langchain/milvus/docker-compose.yml | 4 ++-- comps/vectorstores/langchain/milvus/milvus.yaml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/comps/dataprep/milvus/prepare_doc_milvus.py b/comps/dataprep/milvus/prepare_doc_milvus.py index f4a3d8681..aa9404bed 100644 --- a/comps/dataprep/milvus/prepare_doc_milvus.py +++ b/comps/dataprep/milvus/prepare_doc_milvus.py @@ -12,11 +12,11 @@ from comps.cores.mega.micro_service import opea_microservices, register_microservice from comps.cores.proto.docarray import DocPath from comps.cores.telemetry.opea_telemetry import opea_telemetry - -current_script_path = os.path.dirname(os.path.abspath(__file__)) -parent_dir = os.path.dirname(current_script_path) -sys.path.append(parent_dir) -from utils import document_loader +from comps.dataprep.utils import document_loader +#current_script_path = os.path.dirname(os.path.abspath(__file__)) +#parent_dir = os.path.dirname(current_script_path) +#sys.path.append(parent_dir) +#from utils import document_loader @register_microservice( diff --git a/comps/retrievers/langchain/milvus/retriever_milvus.py b/comps/retrievers/langchain/milvus/retriever_milvus.py index 8fed84306..575980036 100644 --- a/comps/retrievers/langchain/milvus/retriever_milvus.py +++ b/comps/retrievers/langchain/milvus/retriever_milvus.py @@ -27,7 +27,7 @@ service_type=ServiceType.RETRIEVER, endpoint="/v1/retrieval", host="0.0.0.0", - port=7000, + port=7070, ) @traceable(run_type="retriever") @register_statistics(names=["opea_service@retriever_milvus"]) diff --git a/comps/vectorstores/langchain/milvus/docker-compose.yml b/comps/vectorstores/langchain/milvus/docker-compose.yml index 6dc13f5c2..125463752 100644 --- a/comps/vectorstores/langchain/milvus/docker-compose.yml +++ b/comps/vectorstores/langchain/milvus/docker-compose.yml @@ -66,14 +66,14 @@ services: - ./milvus.yaml:/milvus/configs/milvus.yaml - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"] + test: ["CMD", "curl", "-f", "http://localhost:9092/healthz"] interval: 30s start_period: 90s timeout: 20s retries: 3 ports: - "19530:19530" - - "9091:9091" + - "9092:9092" depends_on: - "etcd" - "minio" diff --git a/comps/vectorstores/langchain/milvus/milvus.yaml b/comps/vectorstores/langchain/milvus/milvus.yaml index b30b8317c..cd557652e 100644 --- a/comps/vectorstores/langchain/milvus/milvus.yaml +++ b/comps/vectorstores/langchain/milvus/milvus.yaml @@ -244,7 +244,7 @@ proxy: port: # high-level restful api acceptTypeAllowInt64: true # high-level restful api, whether http client can deal with int64 enablePprof: true # Whether to enable pprof middleware on the metrics port - ip: # if not specified, use the first unicastable address + ip: 0.0.0.0 # if not specified, use the first unicastable address port: 19530 internalPort: 19529 grpc: From c709e4345c3a18ede2d5ae9e2135b0d63801e76f Mon Sep 17 00:00:00 2001 From: jinjunzh Date: Mon, 17 Jun 2024 15:33:59 -0400 Subject: [PATCH 3/3] align port for unified retrieval microservice --- comps/retrievers/langchain/milvus/retriever_milvus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comps/retrievers/langchain/milvus/retriever_milvus.py b/comps/retrievers/langchain/milvus/retriever_milvus.py index 575980036..8fed84306 100644 --- a/comps/retrievers/langchain/milvus/retriever_milvus.py +++ b/comps/retrievers/langchain/milvus/retriever_milvus.py @@ -27,7 +27,7 @@ service_type=ServiceType.RETRIEVER, endpoint="/v1/retrieval", host="0.0.0.0", - port=7070, + port=7000, ) @traceable(run_type="retriever") @register_statistics(names=["opea_service@retriever_milvus"])