﻿# Datasets 5.2.0 includes the concatenation axis in cache identity

Datasets now fingerprints concatenation axes separately, preventing a downstream map cache from confusing row stacking with column joining.

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

The November 9 Datasets release corrects concatenation fingerprints for different axes. This is a small source change with a clear experimental consequence: stacking examples and joining columns must not lead a later transformation to reuse the same cached result merely because the source datasets match.

## An operation has semantics beyond its inputs

The source patch adds axis to the arguments used to derive the concatenated dataset's fingerprint. Axis zero and axis one describe different compositions even when they consume the same source dataset objects. One extends the row population; the other combines fields across rows. A cache identity that excludes this choice can make distinct intermediate datasets look interchangeable to later transformations. The release fixes this specific omission rather than replacing the general fingerprinting mechanism or claiming that every previous cache entry was wrong.

## A warm cache can hide the distinction

The regression test first transforms one concatenation axis, then transforms the other and compares the cached result with an explicitly uncached run. This sequence tests the condition in which stale reuse can occur. Running only a clean-cache example would provide weaker evidence because no competing transformation result exists to reuse. For data debugging, that ordering matters: a pipeline that works in a fresh directory may still be wrong when an earlier experiment populated a cache under an incomplete identity.

## Correctness should survive experiment order

Our suggested acceptance check runs the two compositions in both orders, preserves their fingerprints and compares mapped rows with uncached references. It should use data for which the axes visibly produce different structures, so accidental reuse cannot pass unnoticed. This is a proposed application test, not an additional upstream result. A useful general invariant is that the answer to a data transformation should depend on its declared inputs and parameters, rather than the order in which an unrelated exploratory notebook happened to execute.

## Model provenance includes transformations

When a model uses cached derived data, recording only source repository revisions leaves part of its provenance unspecified. The transformation parameters and library version also help explain what rows reached training. If this fix changes a pipeline's materialized output, that output deserves a new identity even when the upstream source is unchanged. The week's release offers a concrete example of why data reproducibility covers operations as well as files. A cache is an optimization whose reuse decision must preserve the meaning of the transformation.

## Sources

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

## Related reading

- [Rolling back a dataset release: restore the transformation contract as well as the files](/journal/dq-dataset-rollback-transform-contract/)
- [Kedro CachedDataset: why replacing the underlying file does not refresh a warm cache](/journal/fg2-kedro-cached-dataset-external-file-invalidation/)
