Skip to content

Commit

Permalink
fix: Revert "feat: initial support for Milvus 2.4.x (#3795)" downgrad…
Browse files Browse the repository at this point in the history
…ing to 2.3.x for Linux arm64 installation failure (#5414)
  • Loading branch information
bowenliang123 authored Jun 20, 2024
1 parent a88aa20 commit aed56b1
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 31 deletions.
11 changes: 3 additions & 8 deletions api/core/rag/datasource/vdb/milvus/milvus_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from flask import current_app
from pydantic import BaseModel, model_validator
from pymilvus import MilvusClient, MilvusException, connections
from pymilvus.milvus_client import IndexParams

from core.rag.datasource.entity.embedding import Embeddings
from core.rag.datasource.vdb.field import Field
Expand Down Expand Up @@ -255,15 +254,11 @@ def create_collection(
# Since primary field is auto-id, no need to track it
self._fields.remove(Field.PRIMARY_KEY.value)

# Create Index params for the collection
index_params_obj = IndexParams()
index_params_obj.add_index(field_name=Field.VECTOR.value, **index_params)

# Create the collection
collection_name = self._collection_name
self._client.create_collection(collection_name=collection_name,
schema=schema, index_params=index_params_obj,
consistency_level=self._consistency_level)
self._client.create_collection_with_schema(collection_name=collection_name,
schema=schema, index_param=index_params,
consistency_level=self._consistency_level)
redis_client.set(collection_exist_cache_key, 1, ex=3600)

def _init_client(self, config) -> MilvusClient:
Expand Down
98 changes: 78 additions & 20 deletions api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ xinference-client = "0.9.4"
safetensors = "~0.4.3"
zhipuai = "1.0.7"
werkzeug = "~3.0.1"
pymilvus = "~2.4.3"
pymilvus = "2.3.1"
qdrant-client = "1.7.3"
cohere = "~5.2.4"
pyyaml = "~6.0.1"
Expand Down
2 changes: 1 addition & 1 deletion api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ xinference-client==0.9.4
safetensors~=0.4.3
zhipuai==1.0.7
werkzeug~=3.0.1
pymilvus~=2.4.3
pymilvus==2.3.1
qdrant-client==1.7.3
cohere~=5.2.4
pyyaml~=6.0.1
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.milvus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ services:

milvus-standalone:
container_name: milvus-standalone
image: milvusdb/milvus:v2.4.4
image: milvusdb/milvus:v2.3.1
command: ["milvus", "run", "standalone"]
environment:
ETCD_ENDPOINTS: etcd:2379
Expand Down

0 comments on commit aed56b1

Please sign in to comment.