<!-- # hard line break macro for HTML -->

# fiftyone.operators.store.clone

Clone execution store records when a dataset is cloned.

This module registers an “extras cloner” (see
[`fiftyone.core.dataset.register_extras_cloner()`](fiftyone.core.dataset.md#fiftyone.core.dataset.register_extras_cloner)) that copies an
allowlisted set of execution store records from a source dataset to its
clone, so the run history backing stateful panels follows a full dataset
clone.

Copyright 2017-2026, Voxel51, Inc.
<br/>
[voxel51.com](https://voxel51.com/)
<br/>
<br/>

**Functions:**

| [`register_cloneable_store`](#fiftyone.operators.store.clone.register_cloneable_store)(store_name)          | Registers an execution store whose records should be copied when a full dataset is cloned.   |
|-------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
| [`clone_execution_stores`](#fiftyone.operators.store.clone.clone_execution_stores)(src_dataset, ...[, ...]) | Copies allowlisted execution store records to a cloned dataset.                              |

### fiftyone.operators.store.clone.register_cloneable_store(store_name)

Registers an execution store whose records should be copied when a full
dataset is cloned.

Lets code outside this module (e.g. additional panels) opt their store into
cloning without this module needing to import them. Registrations must be
in place before the clone runs.

* **Parameters:**
  **store_name** – the execution store name

### fiftyone.operators.store.clone.clone_execution_stores(src_dataset, dst_dataset, now, id_map=None)

Copies allowlisted execution store records to a cloned dataset.

Execution store records are keyed by `(store_name, key, dataset_id)`.
Cloning copies each matching record under a fresh `_id` with
`dataset_id` rewritten to the destination dataset. Original timestamps
are preserved so the cloned panels reflect the original run history.

A clone re-creates run docs with new ids, so store data keyed by (or
referencing) a run doc id would otherwise be orphaned. `id_map` maps each
source id (the dataset doc + cloned run docs) to its new id; each record’s
`key` and `value` are rewritten through it so references resolve on the
clone.

* **Parameters:**
  * **src_dataset** – the source [`fiftyone.core.dataset.Dataset`](fiftyone.core.dataset.md#fiftyone.core.dataset.Dataset)
  * **dst_dataset** – the destination (clone)
    [`fiftyone.core.dataset.Dataset`](fiftyone.core.dataset.md#fiftyone.core.dataset.Dataset)
  * **now** – the clone timestamp (unused; record timestamps are preserved)
  * **id_map** (*None*) – a `{str(old_id): str(new_id)}` mapping of source ids to
    their clone counterparts
