Datasets:
Fix the dataset card so that every config loads; correct the schema, paper link and typos
#3
by rul048 - opened
Only README.md changes. No data file, config name or data_files path changes.
Problems
load_datasetfails for the six large configs.load_dataset("materialyze/matpes", "pbe")(alsor2scan,pbe-2025.1,r2scan-2025.1,pbe-2025.2,r2scan-2025.2, with or without streaming) stops withCouldn't cast array of type double to null. The dataset viewer fails the same way for these configs. Cause: the card declaresdataset_infofor a config nameddefault, which no config uses, sodatasetsinfers the types from the first rows.formation_energy_per_atomis null in the first ~45,000-49,000 records (it is set only formp-records), so the column is typed as null and the first real value breaks the load.- The small configs load, but not exactly. With the current card and
datasets>= 4.7,pbe-atomsloads 89 rows, butcompositionis inferred as Json and every float of the record is rounded to about 10 digits (e.g.volume3442.7999999999997 in the file loads as 3442.8). - The declared schema does not match the records.
builder_meta,cm5_partial_chargesandddec6are missing;compositionandcomposition_reducedare dicts such as{"Y": 1.0, "Ti": 1.0}, not lists of element/amount;structure.propertiesis always{}, not a string. - Wrong paper on the Hub page. The Hub links arXiv:2306.06482 (TensorNet), taken from an unused link definition, while the MatPES paper is only given as a doi.org link.
- Typos and broken links: "converegence"; the DIRECT link
https//doi.org/...lacks the colon;[pymatgen]has no link definition;[M3GNet],[CHGNet]and[TensorNet]are defined but unused. - The card does not mention the 2025.2
-train,-validand-testfiles that are in the repository.
Changes
dataset_infonow has one entry per config, with the actual columns and types (28 columns; 26 for the-atomsconfigs, which have no charges).compositionandcomposition_reducedare declared as a struct with onefloat64field per element (89 elements), so they load with olderdatasetsversions too; elements absent from a record come back as null.- Paper link changed to https://arxiv.org/abs/2503.04070; unused link definitions removed.
- Typos and broken links fixed.
- Two sentences added: the
pbeandr2scanconfigs always point to the latest version, and for v2025.2 a random 90/5/5 split by record is provided asMatPES-{PBE,R2SCAN}-2025.2-{train,valid,test}.jsonl(and.json).
Tests
Local folder with the new card and the data files of this repository (sha256 equal to the LFS ids on the Hub), datasets 5.2.0 and huggingface_hub 2.4.0. Every loaded row was compared with json.loads of the corresponding line.
| Config | Rows in file | Rows loaded | Rows differing |
|---|---|---|---|
pbe |
433,189 | 433,189 | 0 |
r2scan |
386,544 | 386,544 | 0 |
pbe-2025.2 |
433,189 | 433,189 | 0 |
r2scan-2025.2 |
386,544 | 386,544 | 0 |
pbe-2025.1 |
434,712 | 434,712 | 0 |
r2scan-2025.1 |
387,897 | 387,897 | 0 |
pbe-atoms |
89 | 89 | 0 |
r2scan-atoms |
89 | 89 | 0 |
- With the current card the same files fail as described in problems 1 and 2.
- The
-atomsconfigs also load exactly withdatasets3.6.0, 4.0.0 and 4.6.1 (the large configs were tested with 5.2.0 only). - Streaming (
streaming=True) also reads every row exactly:pbe433,189 andr2scan-2025.1387,897 rows, 0 differing. - The YAML header parses with
huggingface_hub.DatasetCard.load, and everydata_filespath exists in the repository.
Not changed (for discussion)
pbeandr2scanstill return the full file as a singletrainsplit, as before.compositionandcomposition_reducednow load as a dict with all 89 elements,Nonefor absent ones ({k: v for k, v in row["composition"].items() if v is not None}gives the original). Declaring them with thejsontype would keep only the elements present, but with a Json columndatasets5.2.0 rounds every float of the record to about 10 significant digits, so the struct form was chosen.- A missing
cm5_partial_charges/ddec6key loads asNone, andocculoads as1.0instead of1.
shyuep changed pull request status to merged
shyuep deleted the
refs/pr/3 ref