{"slug": "nineteen-more-measured-notes-for-datasets-5-2-0-with-runnable-checks", "title": "Nineteen more measured notes for datasets 5.2.0, with runnable checks", "summary": "Independent locally generated controls against the published datasets==5.2.0 library reproduced several data-handling behaviors on Colab CPU (Python 3.13.18, PyArrow 26.0.1, pandas 3.1.1, NumPy 2.4.6), including the CSV value 02139 being changed to 2139 after row 10,000 unless an explicit string schema was used, and two rows left at zero bytes on with ArrowWriter(...) exit while finalize() wrote two readable rows. The author ran 17 safe test families tied to nineteen notes, did not kill a real worker for issue #8993, and separately ran source-only PR interaction experiments on frozen upstream commit 39fd698 (5.2.1.dev0) rather than the shipped release. The author recommends pinning versions and source revision, checking raw inputs and serialized readback, and changing only one dimension at a time, treating the results as possible test contracts rather than a scorecard for maintainers.", "body_md": "Hmm… I was able to reproduce the behaviors I tested. Quite a few of these seem to call for careful fixes:\n\nI ran independent, locally generated controls against **the published `datasets==5.2.0`** on Colab CPU (Python 3.13.18, PyArrow 26.0.1, pandas 3.1.1, NumPy 2.4.6). These covered **17 safe test families** connected to the nineteen notes, not a claim that I independently ran all nineteen original checks. I did **not** kill a real worker for [#8993](https://github.com/huggingface/datasets/issues/8993); the [#9101](https://github.com/huggingface/datasets/issues/9101) check inspected tar member selection rather than extracting devices or FIFOs. Some other families exercised only a subset of the reported methods.\n\nThe most useful independent checks were [#9121](https://github.com/huggingface/datasets/issues/9121) (the CSV value `02139` changed to `2139` after row 10,000, but an explicit string schema retained it), [#9096](https://github.com/huggingface/datasets/issues/9096) (two rows left **zero bytes** on `with ArrowWriter(...)` exit; `finalize()` wrote two readable rows, while 1,500 staged rows without finalization retained only 1,000), [#9128](https://github.com/huggingface/datasets/issues/9128) (`[{}, {'x': 1}]` also gave **zero rows**, while reversing the records kept two), and [#9122](https://github.com/huggingface/datasets/issues/9122) (JSON padding/chunk size changed the row structure). A list-of-struct null-field alignment issue also reproduced under the selected [#9114](https://github.com/huggingface/datasets/issues/9114) controls.\n\nSeparately, I ran **source-only PR interaction experiments**, using frozen upstream commit [`39fd698`](https://github.com/huggingface/datasets/commit/39fd698d619816099ffa8eb07b5c79b0f4f5f299) (`5.2.1.dev0`), not the shipped release. Some combinations needed a deliberately synthesized integration of conflicting changes; neither those results nor the checks below imply a merged upstream branch or passing full CI.\n\nFor any fix, start with three cheap comparisons: **pin versions and source revision**, including `streaming`, `num_proc`, `Features`, format and chunk size; **check raw inputs and serialized readback**, not just exceptions; then **change only one dimension** (explicit schema, single process, unformatted input, first-row order, or `finalize()`). Compare with an unchanged base and preserve a negative control. Destructive pool/archive checks belong in isolated, timed subprocesses, not an ordinary notebook.\n\n**CSV:** [#9061](https://github.com/huggingface/datasets/pull/9061) and [#9120](https://github.com/huggingface/datasets/pull/9120) can jointly preserve codes and enforce streamed-schema consistency, but in one six-row source-only run they executed a converter **15 times** versus **6** on base. **Nested Features:** [#8927](https://github.com/huggingface/datasets/pull/8927) and [#9115](https://github.com/huggingface/datasets/pull/9115) conflict textually; a deliberate semantic integration met **10/10 selected contracts**. **ArrowWriter:** a synthesized [#9104](https://github.com/huggingface/datasets/pull/9104), [#8642](https://github.com/huggingface/datasets/pull/8642), [#8558](https://github.com/huggingface/datasets/pull/8558) combination met **9/10**, with the remaining question already present on base.\n\nThe details below give the measurements, fix alternatives, and provenance. I would treat them as possible test contracts and design choices, not a scorecard for the Desk, issue authors, or maintainers.\n\n1. Released 5.2.0: observations, controls, and scope\nThe smallest high-information additions are a **CSV converter invocation count** when #9061/#9120 share first-chunk work; an **Arrow IPC readback and writer-ownership** check; and **both source orders plus an incompatible-type rejection** when combining nested-Features changes. For seed defaults, partial splits, fractional casts, binary JSON, and zero-column rows, a clear compatibility decision may be better than an automatic breaking change. Keeping reported, independently observed and proposed-fix behavior separate should help future readers reuse these runnable checks.", "url": "https://wpnews.pro/news/nineteen-more-measured-notes-for-datasets-5-2-0-with-runnable-checks", "canonical_source": "https://discuss.huggingface.co/t/nineteen-more-measured-notes-for-datasets-5-2-0-with-runnable-checks/192370#post_2", "published_at": "2026-11-23 10:39:59+00:00", "updated_at": "2026-11-23 10:42:34.236314+00:00", "lang": "en", "topics": ["machine-learning", "developer-tools"], "entities": ["Hugging Face", "datasets", "PyArrow", "pandas", "NumPy", "Colab", "GitHub"], "also_reported_by": [], "takeaway": "Against datasets==5.2.0, the CSV value 02139 became 2139 after row 10,000 unless an explicit string schema was set, and ArrowWriter left two rows at zero bytes on context-manager exit while finalize() wrote two readable rows.", "recommendation": {"advice": "When writing datasets with ArrowWriter, call finalize() explicitly and verify serialized readback, and set an explicit string schema for code-like CSV columns to prevent values such as 02139 being coerced to 2139.", "playbook": "training-data", "playbook_url": "https://wpnews.pro/playbooks/training-data"}, "alternates": {"html": "https://wpnews.pro/news/nineteen-more-measured-notes-for-datasets-5-2-0-with-runnable-checks", "markdown": "https://wpnews.pro/news/nineteen-more-measured-notes-for-datasets-5-2-0-with-runnable-checks.md", "text": "https://wpnews.pro/news/nineteen-more-measured-notes-for-datasets-5-2-0-with-runnable-checks.txt", "jsonld": "https://wpnews.pro/news/nineteen-more-measured-notes-for-datasets-5-2-0-with-runnable-checks.jsonld"}}