﻿# Datasets 5.2.0 preserves rank ownership when iterable datasets are concatenated

Concatenated iterable datasets now preserve their node split and require matching split configurations, preventing accidental repeated exposure across ranks.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-model-datasets-concat-rank-ownership/
Language: en

The November 9 Datasets release fixes a distributed-data failure: concatenation after split_dataset_by_node could expose all data to every rank. The source change preserves the distributed split and rejects inputs whose split configurations differ. This affects the meaning of a training epoch.

## A split is part of dataset state

An iterable dataset can carry the information that assigns data to a distributed rank. Concatenation must preserve that information or reproduce equivalent ownership. The patch passes the first dataset's distributed state into the combined dataset and checks that all inputs match it. This is more than a throughput concern. If every rank reads the whole input, the job can still run and report losses, but the number of exposures per example differs from the intended distributed schedule.

## The new check rejects incompatible ownership

The regression tests cover both concatenation axes, multiple world sizes and different source-shard counts. They compare concatenating already split datasets with splitting the combined dataset, and verify global coverage. Another test rejects mixing a split dataset with an unsplit one. This is useful evidence about the intended contract. It does not imply that every arbitrary combination of sharding, filtering and resumption is correct. Those operations can introduce their own ownership changes and deserve workload-specific checks.

## Count identities, not only batches

Our proposed acceptance test assigns stable IDs to a small synthetic corpus, then collects IDs separately for each rank after the real combination pipeline. The union should cover the intended population, and multiplicities should match the sampling policy. A batch count alone cannot show whether ranks processed overlapping examples. This suggested test should be performed before expensive training. Its value comes from checking the data ownership invariant directly instead of inferring correctness from a plausible loss curve or a busy accelerator.

## Old runs need their original exposure model

An upgrade can change effective sampling for a pipeline that previously encountered this bug. Reproducing an old result may require documenting its actual repeated exposures rather than describing only the intended epoch. That is a reporting issue, not evidence that every historical Datasets run was affected. The release supplies a narrower, testable correction for concatenated distributed iterables. A model comparison should identify whether the before-and-after jobs consumed equivalent examples and exposure counts before attributing an accuracy change to training code or model architecture.

## Sources

- [Datasets 5.2.0 release](https://github.com/huggingface/datasets/releases/tag/5.2.0)
- [Datasets source change and regression tests #8800](https://github.com/huggingface/datasets/pull/8800)

## Related reading

- [Rolling back a dataset release: restore the transformation contract as well as the files](/journal/dq-dataset-rollback-transform-contract/)
- [MLflow dataset tracking: a digest and source describe lineage without guaranteeing exact data replay](/journal/fg2-mlflow-dataset-metadata-source-replay/)
