You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When dict has max_length or dim {'name': 'error_message', 'type': <DataType.VARCHAR: 21>, 'max_length': 1024} a_dict={'name': 'error_msg_vector', 'type': <DataType.FLOAT_VECTOR: 101>, 'dim': 768}
When I new FieldSchema.construct_from_dict(a_dict), got
TypeError: pymilvus.orm.schema.FieldSchema() got multiple values for keyword argument 'max_length'
and
pymilvus.exceptions.MilvusException: <MilvusException: (code=65535, message=dimension is not defined in field type params, check type param dim for vector field)>
Expected Behavior
When I new FieldSchema.construct_from_dict(a_dict) no error.
Is there an existing issue for this?
Describe the bug
When dict has
max_length
ordim
{'name': 'error_message', 'type': <DataType.VARCHAR: 21>, 'max_length': 1024}
a_dict={'name': 'error_msg_vector', 'type': <DataType.FLOAT_VECTOR: 101>, 'dim': 768}
When I new
FieldSchema.construct_from_dict(a_dict)
, gotTypeError: pymilvus.orm.schema.FieldSchema() got multiple values for keyword argument 'max_length'
and
pymilvus.exceptions.MilvusException: <MilvusException: (code=65535, message=dimension is not defined in field type params, check type param
dimfor vector field)>
Expected Behavior
When I new
FieldSchema.construct_from_dict(a_dict)
no error.Steps/Code To Reproduce behavior
Environment details
Anything else?
add below code at pymilvus/orm/schema.py can fix it.
within def construct_from_dict(cls, raw: Dict):
The text was updated successfully, but these errors were encountered: