﻿# ClearML dataset parents: merge order decides which file survives a path collision

Build ClearML dataset versions with explicit parent order, path collision expectations and finalized local-copy verification instead of assuming a union of independent files.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-clearml-dataset-parent-order-path-collision/
Language: en

## Look beyond the parent dataset names

A training dataset combines a base image collection with a correction package. Both contain an annotation file at the same relative path. Reversing the parent sequence changes the assembled file even though the selected dataset names look unchanged. The [Dataset API](https://clear.ml/docs/latest/docs/references/sdk/dataset/) defines ordered merging with later parents overriding earlier overlapping files. Parent membership alone therefore does not completely describe the input snapshot. Preserve the ordered identities used to create the child.

## Treat path collision as a content decision

A collision may be intentional when the correction replaces a known file. It may also be accidental when unrelated sources both use a generic annotation filename. Decide whether those paths represent the same logical artifact before accepting the override. A filesystem merge does not reconcile incompatible label vocabularies or join annotation rows by sample identity. If both sources must remain, give them distinct paths and define the application-level combination separately.

## Separate incremental storage from the full view

The [file-based data overview](https://clear.ml/docs/latest/docs/clearml_data/) explains that versions can store changes relative to their parents. A small child upload does not imply a small final training dataset or an independently recoverable set of files. The complete view can depend on inherited content. When investigating a missing file on a fresh worker, inspect the parent chain and object availability rather than judging the dataset by the size of the latest uploaded change alone.

## Finalize and inspect the assembled copy

The [dataset SDK workflow](https://clear.ml/docs/latest/docs/clearml_data/clearml_data_sdk/) describes creating, updating and retrieving versions. The API requires finalization before obtaining the read-only merged local copy. Verify content at the colliding path in that assembled view, not only in the correction package's source folder. A training script should consume the declared dataset identity and its resolved local view rather than an unrelated working directory whose filename happens to match.

## Use a deliberate collision fixture

Create small parent snapshots containing recognizable different content at a shared path and unique files elsewhere. Check the expected child membership and selected annotation content. The guides on [annotation identities](/journal/data-guide-coco-instance-caption-identities/) and [label taxonomy mappings](/journal/data-guide-label-taxonomy-version-mapping/) explain semantic checks after assembly. A recorded parent order plus verified file content makes the merge reviewable. It does not establish that the chosen replacement is scientifically correct; that remains an annotation and evaluation decision.
