1.  [](/)
2.  [Code examples](/recipes)
3.  Dataset Versioning

Back to code examples

TrainingDriftThemes

# Dataset Versioning

Treat versioned object storage as your dataset's source of truth. Capture complete snapshots-raw assets, embeddings, and cluster assignments-for deterministic reconstruction at any point in time.

video

image

audio

text

Production

[Run in Builder](/build?recipe=dataset-versioning)

"Retrieve training dataset snapshot from October 1st with all embeddings and cluster assignments"

### Why This Matters

When datasets stop slipping out from under you, everything downstream gets easier. True reproducibility means rebuilding exact training inputs, not reconstructing from memory.

Python

cURL

from mixpeek import Mixpeek

client \= Mixpeek(api\_key\="YOUR\_API\_KEY", namespace\="training-data")

\# 1. Every object records the dataset version it belongs to

bucket \= client.buckets.create(

    bucket\_name\="training-data",

    bucket\_schema\={"properties": {"image": {"type": "image"}}},

)

client.buckets.upload(

    bucket\["bucket\_id"\],

    blobs\=\[{"property": "image", "type": "image", "data": "s3://your-bucket/training/v2/img-0001.jpg"}\],

    metadata\={"version": "v2"},

)

client.buckets.upload(

    bucket\["bucket\_id"\],

    blobs\=\[{"property": "image", "type": "image", "data": "s3://your-bucket/training/v3/img-0001.jpg"}\],

    metadata\={"version": "v3"},

)

\# 2. One collection per version, scoped with a source filter on that metadata

v2 \= client.collections.create(

    collection\_name\="training-v2",

    source\={"type": "bucket", "bucket\_ids": \[bucket\["bucket\_id"\]\], "source\_filters": {"filters": {"AND": \[{"field": "metadata.version", "operator": "eq", "value": "v2"}\]}}},

    feature\_extractor\={

        "feature\_extractor\_name": "multimodal\_extractor",

        "version": "v1",

    },

)

\# The next version is a clone with a different filter; extractor and settings carry over

v3 \= client.collections.clone(

    v2\["collection\_id"\],

    collection\_name\="training-v3",

    source\={

        "type": "bucket",

        "bucket\_ids": \[bucket\["bucket\_id"\]\],

        "source\_filters": {"filters": {"AND": \[{"field": "metadata.version", "operator": "eq", "value": "v3"}\]}},

    },

)

client.collections.trigger(v2\["collection\_id"\])

client.collections.trigger(v3\["collection\_id"\])

\# 3. Query each version on its own and compare

for version in ("training-v2", "training-v3"):

    retriever \= client.retrievers.create(

        retriever\_name\="search-" + version,

        collection\_identifiers\=\[version\],

        input\_schema\={"query": {"type": "text", "required": True}},

        stages\=\[

            {

                "stage\_name": "search",

                "stage\_id": "feature\_search",

                "parameters": {

                    "searches": \[

                        {

                            "feature\_uri": "mixpeek://multimodal\_extractor@v1/vertex\_multimodal\_embedding",

                            "query": {"input\_mode": "text", "value": "{{INPUT.query}}"},

                            "top\_k": 20,

                        },

                    \],

                    "final\_top\_k": 20,

                },

            },

        \],

    )

    results \= client.retrievers.execute(retriever\["retriever\_id"\], inputs\={"query": "product demos"})

    print(version, \[doc\["document\_id"\] for doc in results\["documents"\]\[:5\]\])

### Feature Extractors

Multimodal Extractor

Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.

### Retriever Stages

feature search

Search and filter documents by vector similarity using feature embeddings

filter

### Resources Used

Clustering

[

Version Clusters

Cluster snapshots tied to dataset versions

Cluster snapshots tied to dataset versions



](https://mixpeek.com/docs/enrichment/clusters)

Analytics

[

Version Metrics

Track changes between dataset versions

Track changes between versions



](https://mixpeek.com/docs/enrichment/clusters)

### Related Blog Posts

[Object Storage as Your Dataset's Source of Truth](https://mixpeek.com/blog/object-storage-as-your-source-of-truth)

### Documentation

[Clusters](https://mixpeek.com/docs/enrichment/clusters)[Collections](https://mixpeek.com/docs/platform/data-model)

## Related code examples and resources

Pages on the same stages, extractors and patterns.

[

Extractor

### Multimodal Extractor

Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.

Learn more





](/extractors/multimodal)[

Recipe

### Clustering & Theme Discovery

Unsupervised clustering that groups content into semantic themes using HDBSCAN. Surfaces hidden patterns, content variants, and outliers without requiring predefined labels.

Learn more





](/recipes/clustering-theme-discovery)[

Recipe

### Semantic Drift Detection

Monitor distribution shifts between baseline and current data using cluster comparison. Detect when new content diverges from training data or when content mix changes unexpectedly.

Learn more





](/recipes/semantic-drift)[

Recipe

### Processing a Large Media Library

Run extraction over tens of thousands of files without paying for the same object twice. Price the job before you submit it, keep new uploads flowing in on their own, and move cold collections out of the vector store while they stay searchable.

Learn more





](/recipes/scalable-multimodal-processing)[

Recipe

### Video Transcription & Indexing Pipeline

Automatically transcribe video content with speaker identification, timestamps, and full-text indexing for downstream search and analytics.

Learn more





](/recipes/video-transcription-pipeline)[

Recipe

### Semantic Multimodal Search

Unified semantic search across all content types. Query by natural language and retrieve relevant video clips, images, audio segments, and documents based on meaning-not keywords or manual tags.

Learn more





](/recipes/semantic-multimodal-search)