Skip to content

Commit

Permalink
Fix typo and correct grammar (milvus-io#2333)
Browse files Browse the repository at this point in the history
Fix typo: change "UnSupported" to "Unsupported"
Fix grama error:
* _None entities, please provide valid entities_ to _'entities' must be
a list, please provide valid entity data._
* _None rows, please provide valid row data._ to _'rows' must be a list,
please provide valid row data._

Signed-off-by: NamCaoHai <[email protected]>
  • Loading branch information
CaoHaiNam authored Nov 7, 2024
1 parent 2d9d661 commit 0bf680f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit 0bf680f

Please sign in to comment.