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
from_csv not robust for real-world datasets #3661
Comments
|
@alexcg1 @hanxiao @JoanFM 👋🏽 I'm new to Jina, and I'd love to help fix this Based on my investigation, it looks like the dataset has a field, I think this could be resolved by either doing validation on meta fields before parsing into Protobufs or by ignoring other fields when a |
|
For the delimiter parameter wouldn’t you just add in a new optional parameter on the from_csv function that has a default to “,” in https://github.com/jina-ai/jina/blob/86a6b987f3d5f3c80a612e37ece4b8411b535ac2/jina/types/document/generators.py |
Yup, this seems like a logical way to do it |
|
Reproducing the error locally, I have a different source error: For the I mean the intersection of fields name is valid, just the problem seems to be on the value side. |


Describe the bug
I'm having major trouble with
from_csv.Context: I'm writing tutorial for build simple text search engine with Jina + Hub. I don't want to include a whole section of processing datasets, hence just passing a CSV into
from_csv. I tried with meme dataset (converted tsv) before, and now using superhero dataset (native csv). Still getting same issues.What I want to do:
Document.textto be populated from the fieldpowers_textDocument.tagsto be every other field in the recordMy code:
Expected result:
Actual result:
Describe how you solve it
Write a CSV loader by hand, using Python's
csvlibrary. Which works right away out of the box, so I thinkfrom_csvshould be able to work better.Nice to haves
While we're at it, it'd be really nice to have a
delimiterparameter so we could use `from_csv('foo.csv', delimiter='\t') to load TSVs etcEnvironment
Screenshots
The text was updated successfully, but these errors were encountered: