cd /news/machine-learning/one-more-measured-note-for-datasets-… · home › topics › machine-learning › article
[ARTICLE · art-177080] src=discuss.huggingface.co ↗ pub= topic=machine-learning verified=true sentiment=↓ negative

One more measured note for datasets — the polars format raises on any decodable feature

A bug report reproduced a `TypeError: 'dict' object is not callable` on Hugging Face Datasets 5.2.0 with PyArrow 24.0.0 and Polars 1.35.2, where normal decoded-image row and batch reads failed on both `Dataset` and `IterableDataset` while consuming the eager image column worked. The reporter found the complementary fixes in pull requests #8402 (select the actual columns to decode) and #9156 (choose an output type), with #8403 addressing a separate pandas projection issue, and warned that successful PIL-image reads do not imply safe Arrow writeback — returning a decoded DataFrame from a batched map produced eight-byte binary values in place of the original image storage.

recommendation

When reading image datasets with Polars, use explicit `select_columns` plus a chosen output type, and keep images in encoded storage unless they must change, since decoded DataFrame writeback corrupts image columns.

more in playbook: Fine-tuning and data
read1 min views3 publishedNov 27, 2026

I was able to reproduce it too, so I tried a few variations:

I reproduced the same TypeError: 'dict' object is not callable on Datasets 5.2.0, PyArrow 24.0.0 and Polars 1.35.2. The normal decoded-image row and batch reads failed on both Dataset and IterableDataset; consuming the eager image column worked. Plain text, Python, full pandas and raw-image controls succeeded.

The fixes #8402 and #9156 are complementary: select the actual columns to decode, then choose an output type. Both combined shapes covered the selected Polars read cases. #8403 fixes a separate pandas projection issue.

One more distinction matters for users of the integration: successful PIL-image reads do not imply safe Arrow writeback. Returning a decoded DataFrame from a batched map produced eight-byte binary values in place of the original image storage; returning just a dictionary of the new columns also lost the existing columns in the table-format cases I tried.

Goal Route
Work only on ordinary columns Actual select_columns , not just the format’scolumns= .
Add a column without changing images Python-format map, or a separate Polars calculation followed by checked add_column .
Read PIL images Python format, or a checked decoded formatter.
Process encoded storage Raw export or Image(decode=False) ; preserve Features when reconstructing.
Modify images in a returned table Explicit image encoding and compatible output Features.

The first two routes worked on the unmodified release. When images need not change, keep their storage rather than decode and re-encode just to calculate another column.

  1. Independent reproduction and the read paths
── more in #machine-learning 4 stories · sorted by recency
── more on @hugging face 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/one-more-measured-no…] indexed:0 read:1min 2026-11-27 · —