Skip to content

Commit

Permalink
Ensure truncate_long_strings parameter is set in configs and passed a…
Browse files Browse the repository at this point in the history
…long to MilvusVectorDBResourceService
  • Loading branch information
dagardner-nv committed Apr 24, 2024
1 parent 9c5435c commit dbe34dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/llm/vdb_upload/vdb_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,15 @@ def build_cli_configs(source_type,
cli_vdb_conf = {
# Vector db upload has some significant transaction overhead, batch size here should be as large as possible
'batch_size': 16384,
'resource_name': vector_db_resource_name,
'embedding_size': embedding_size,
'recreate': True,
'resource_name': vector_db_resource_name,
'resource_schemas': {
vector_db_resource_name:
build_defualt_milvus_config(embedding_size) if (vector_db_service == 'milvus') else None,
},
'service': vector_db_service,
'truncate_long_strings': True,
'uri': vector_db_uri,
}

Expand Down
8 changes: 6 additions & 2 deletions morpheus/service/vdb/milvus_vector_db_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,13 +605,17 @@ def __init__(self,
password: str = "",
db_name: str = "",
token: str = "",
truncate_long_strings: bool = False,
**kwargs: dict[str, typing.Any]):

self._truncate_long_strings = truncate_long_strings
self._client = MilvusClient(uri=uri, user=user, password=password, db_name=db_name, token=token, **kwargs)

def load_resource(self, name: str, **kwargs: dict[str, typing.Any]) -> MilvusVectorDBResourceService:

return MilvusVectorDBResourceService(name=name, client=self._client, **kwargs)
return MilvusVectorDBResourceService(name=name,
client=self._client,
truncate_long_strings=self._truncate_long_strings,
**kwargs)

def has_store_object(self, name: str) -> bool:
"""
Expand Down

0 comments on commit dbe34dc

Please sign in to comment.