Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo and correct grammar #2333

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions pymilvus/client/entity_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def convert_to_array(obj: List[Any], field_info: Any):
field_data.string_data.data.extend(obj)
return field_data
raise ParamError(
message=f"UnSupported element type: {element_type} for Array field: {field_info.get('name')}"
message=f"Unsupported element type: {element_type} for Array field: {field_info.get('name')}"
)


Expand Down Expand Up @@ -424,7 +424,7 @@ def pack_field_value_to_field_data(
% (field_name, "array", type(field_value))
) from e
else:
raise ParamError(message=f"UnSupported data type: {field_type}")
raise ParamError(message=f"Unsupported data type: {field_type}")


# TODO: refactor here.
Expand Down Expand Up @@ -562,7 +562,7 @@ def entity_to_field_data(entity: Any, field_info: Any, num_rows: int):
% (field_name, "sparse_float_vector", type(entity.get("values")[0]))
) from e
else:
raise ParamError(message=f"UnSupported data type: {entity_type}")
raise ParamError(message=f"Unsupported data type: {entity_type}")

return field_data

Expand Down
6 changes: 3 additions & 3 deletions pymilvus/client/grpc_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def _prepare_batch_insert_request(
if param and not isinstance(param, milvus_types.InsertRequest):
raise ParamError(message="The value of key 'insert_param' is invalid")
if not isinstance(entities, list):
raise ParamError(message="None entities, please provide valid entities.")
raise ParamError(message="'entities' must be a list, please provide valid entity data.")

schema = kwargs.get("schema")
if not schema:
Expand Down Expand Up @@ -634,7 +634,7 @@ def _prepare_batch_upsert_request(
if param and not isinstance(param, milvus_types.UpsertRequest):
raise ParamError(message="The value of key 'upsert_param' is invalid")
if not isinstance(entities, list):
raise ParamError(message="None entities, please provide valid entities.")
raise ParamError(message="'entities' must be a list, please provide valid entity data.")

schema = kwargs.get("schema")
if not schema:
Expand Down Expand Up @@ -691,7 +691,7 @@ def _prepare_row_upsert_request(
**kwargs,
):
if not isinstance(rows, list):
raise ParamError(message="None rows, please provide valid row data.")
raise ParamError(message="'rows' must be a list, please provide valid row data.")

fields_info, enable_dynamic = self._get_info(collection_name, timeout, **kwargs)
return Prepare.row_upsert_param(
Expand Down