Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
replace issubclass usage in milvus
Signed-off-by: YuXuan Tay <[email protected]>
  • Loading branch information
yxtay committed Aug 16, 2024
commit cf2d0bf4c13d9d6b6326525f58172cc51d78349c
4 changes: 2 additions & 2 deletions docarray/index/backends/milvus.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def python_type_to_db_type(self, python_type: Type) -> Any:
AbstractTensor: DataType.FLOAT_VECTOR,
}

if issubclass(python_type, ID):
if safe_issubclass(python_type, ID):
return DataType.VARCHAR

for py_type, db_type in type_map.items():
Expand Down Expand Up @@ -665,7 +665,7 @@ def find_batched(
if search_field:
if '__' in search_field:
fields = search_field.split('__')
if issubclass(self._schema._get_field_annotation(fields[0]), AnyDocArray): # type: ignore
if safe_issubclass(self._schema._get_field_annotation(fields[0]), AnyDocArray): # type: ignore
return self._subindices[fields[0]].find_batched(
queries,
search_field='__'.join(fields[1:]),
Expand Down