-
Notifications
You must be signed in to change notification settings - Fork 332
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
[Bug]: When using the bulk writer to generate CSV files, if there are bf16 and float16 vector types present, a JSON dump error will occur. #2276
Comments
/assign @OxalisCu |
@zhuwenxing: GitHub didn't allow me to assign the following users: OxalisCu. Note that only milvus-io members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @yhmo |
https://github.com/milvus-io/pymilvus/blob/master/examples/example_bulkinsert_csv.py |
pymilvus/examples/example_bulkinsert_csv.py Lines 100 to 117 in da51ba1
At the same time, is the usage of Dynamic SCHEMA correct in this example? I understand it should be written like this, right?
|
A good user experience would be if my inserted data is a dataframe, which can be inserted into Milvus through the insert interface, and the CSV file generated from this dataframe using df.to_csv(index=False) can be directly used as a bulk insert file. |
OK, thank you for reporting this bug, I will fix it soon. example_bulkinsert_csv.py does lack tests for all data types and bulk writers. The reason is that I overlooked this issue when writing tests based on example_bulkinsert_json.py. I noticed that example_bulkwriter.py supports testing of bulk writers for various file formats. I would like to add tests for bulk writer csv in this file. Do you think it is okay? |
The code here is correct, and is for verifying a small function. As long as the collection allows dynamic field, milvus will automatically put the fields (such as 'dynamic_field') that are not in the schema into the dynamic field ($meta) when parsing, so both of the codes above are supported. This part of the code is on line 102 of row_parser.go: |
However, using this method, each row can only contain the same dynamic column (I understand this method to be more like a fixed column that is not defined in the schema), but in many cases, the dynamic column names of different rows are different, and this method should not handle this situation |
Indeed, the second way of writing is better. I will change it in example.csv |
…v supports null (#2281) #2276 --------- Signed-off-by: OxalisCu <[email protected]>
@OxalisCu
Have you seen this error before? I’d be happy to work on fixing it as my first contribution if it’s still unresolved. Thanks! |
I haven't reproduced this problem. The error seems to be that milvus does not support the csv format. Please check whether milvus is compiled from the latest code of the master branch. https://github.com/milvus-io/milvus |
Why should I check Milvus again? I’m wondering if there’s an issue with bulk inserting CSV files or if Milvus currently doesn’t support bulk insert from CSV. Could you clarify this? |
Milvus supported the csv format in August milvus-io/milvus#34938. The current released version does not support inserting csv files. From the error message, I guess the reason is that you are not using the latest milvus code, so you can build milvus from the latest code and try again. |
Is there an existing issue for this?
Describe the bug
When using the bulk writer to format CSV files, if bf16 and float16 vector types are present, a JSON dump error will occur.
Failed to convert field float16_vec_field value to string, error: Object of type ndarray is not JSON serializable
Expected Behavior
works well
Steps/Code To Reproduce behavior
No response
Environment details
Anything else?
No response
The text was updated successfully, but these errors were encountered: