Skip to content

Commit 0068119

Browse files
authored
[cherry-pick] covert params' value from string to int (#2026)
master pr: #2022 to avoid such param error: ``` pymilvus.exceptions.ParamError: <ParamError: (code=1, message=Collection field dim is 512, but entities field dim is 512)> ``` Signed-off-by: PowderLi <[email protected]>
1 parent df9d2e6 commit 0068119

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎pymilvus/orm/schema.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ def _parse_type_params(self):
349349
return
350350
if not self._kwargs:
351351
return
352-
# currently only support ndim
352+
# currently only support "dim", "max_length", "max_capacity"
353353
if self._kwargs:
354354
for k in COMMON_TYPE_PARAMS:
355355
if k in self._kwargs:
356356
if self._type_params is None:
357357
self._type_params = {}
358-
self._type_params[k] = self._kwargs[k]
358+
self._type_params[k] = int(self._kwargs[k])
359359

360360
@classmethod
361361
def construct_from_dict(cls, raw: Dict):

0 commit comments

Comments
 (0)