Language field type mismatch: str instead of list.

#1
by stay - opened

Hi, thanks much for your work in building this dataset.

I was trying to download a sample using:

pubmed_sample = load_dataset('HoangHa/pubmed25', split='train[:1%])

and got this error: "Field 'Language': Type mismatch. Target is <class 'str'>, Source is <class 'list'>. Skipping update."

I think it might be related to line 443 of pubmed25.py loading script:
"Language": datasets.Value("string")

I also noticed that it seems to download the entire dataset instead of a 1% sample.

rgds
stay

Ah yes, the current code downloads the entire dataset at once. You can modify it based on the files available here: https://ftp.ncbi.nlm.nih.gov/pubmed/baseline/

TL;DR: the current code isn’t really UX-friendly—you’ll need to get your hands dirty at some point. If you want to investigate the subset of it, try streaming instead, check out: https://huggingface.co/docs/datasets/en/stream

By the way, the mismatch error is a known issue. It’s not critical, so I’ve left it as-is for now, but I do plan to fix it later. Thanks for the feedback!

k, will go study those. TQVM.

stay changed discussion status to closed
Your need to confirm your account before you can post a new comment.

Sign up or log in to comment