Skip to content

Commit

Permalink
[cherry-pick] covert params' value from string to int (#2026)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
PowderLi authored Apr 10, 2024
1 parent df9d2e6 commit 0068119
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymilvus/orm/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,13 @@ def _parse_type_params(self):
return
if not self._kwargs:
return
# currently only support ndim
# currently only support "dim", "max_length", "max_capacity"
if self._kwargs:
for k in COMMON_TYPE_PARAMS:
if k in self._kwargs:
if self._type_params is None:
self._type_params = {}
self._type_params[k] = self._kwargs[k]
self._type_params[k] = int(self._kwargs[k])

@classmethod
def construct_from_dict(cls, raw: Dict):
Expand Down

0 comments on commit 0068119

Please sign in to comment.