Skip to content

Add support for blueprint dataset#11758

Merged
abey79 merged 11 commits intomainfrom
antoine/oss-blueprint-dataset
Nov 4, 2025
Merged

Add support for blueprint dataset#11758
abey79 merged 11 commits intomainfrom
antoine/oss-blueprint-dataset

Conversation

@abey79
Copy link
Member

@abey79 abey79 commented Nov 3, 2025

Related

What

This PR implements and tests blueprint dataset with the same semantics as cloud. Include a few minor drive-by python api improvements, as well as a whole bunch of testing.

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

Web viewer built successfully.

Result Commit Link Manifest
9a9ee86 https://rerun.io/viewer/pr/11758 +nightly +main

View image diff on kitdiff.

Note: This comment is updated whenever you push a commit.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for blueprint datasets in the in-memory store implementation, enabling each recording dataset to have an associated blueprint dataset. The changes introduce the ability to specify store kinds (Recording vs Blueprint) when creating datasets and implements filtering by store kind in dataset queries.

Key changes:

  • Extended create_dataset to accept store kind, optional entry ID, and dataset details parameters
  • Added blueprint dataset auto-creation when creating recording datasets
  • Implemented entry kind filtering in find_entries to distinguish between Dataset and BlueprintDataset

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/store/re_server/src/store/in_memory_store.rs Extended create_dataset signature to support store kind, optional ID, and details; added ID existence check
crates/store/re_server/src/store/error.rs Added DuplicateEntryIdError variant and updated error conversion
crates/store/re_server/src/store/dataset.rs Added store kind and details fields to Dataset; implemented entry kind derivation
crates/store/re_server/src/rerun_cloud.rs Updated create_dataset_entry to auto-create blueprint datasets; added store kind filtering in find_datasets and find_entries
crates/store/re_redap_tests/src/tests/mod.rs Added create_dataset test module
crates/store/re_redap_tests/src/tests/create_dataset.rs Comprehensive test suite for dataset creation with blueprint support
crates/store/re_protos/src/v1alpha1/rerun.cloud.v1alpha1.ext.rs Changed CreateDatasetEntryRequest from String alias to struct with name and optional ID fields

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nikolausWest
Copy link
Member

Related to this, do we have any examples / snippets showing how to set a default blueprint for a dataset from Python?

@abey79
Copy link
Member Author

abey79 commented Nov 3, 2025

Related to this, do we have any examples / snippets showing how to set a default blueprint for a dataset from Python?

Not that I know of. The only place we do that is in our internal dataset_util.py script. With this PR and the new Server python object, we're now able to produce a decent version of such snippet though.

I'll try to make one and hand it off to @ntjohnson1.

@abey79
Copy link
Member Author

abey79 commented Nov 3, 2025

Related to this, do we have any examples / snippets showing how to set a default blueprint for a dataset from Python?

Actually, glad you asked. Finding bugs 😅

@abey79
Copy link
Member Author

abey79 commented Nov 3, 2025

Here is such a snippet. For this PR, I'm translating it into a e2e test.

from pathlib import Path
import tempfile

import rerun as rr
import rerun.blueprint as rrb


# Create a recording and save it to a temporary file
rrd_path = tempfile.mktemp(suffix=".rrd")
rec = rr.RecordingStream("rerun_example_dataset_blueprint")
rec.save(rrd_path)
rec.log("points", rr.Points2D([[0, 0], [1, 1]]))
rec.flush()


# Create a blueprint and save it to a temporary file
rbl_path = tempfile.mktemp(suffix=".rbl")
blueprint = rrb.Blueprint(rrb.Spatial2DView(visual_bounds=rrb.VisualBounds2D(x_range=[-1, 2], y_range=[-1, 2])))
blueprint.save("rerun_example_dataset_blueprint", rbl_path)


# Launch a server a create a new dataset
server = rr.server.Server()
client = server.client()
ds = client.create_dataset("my_dataset")

# Register our recording to the dataset
ds.register(Path(rrd_path).absolute().as_uri())

# Register our blueprint to the corresponding blueprint dataset
bds = ds.blueprint_dataset()
blueprint_partition_id = bds.register(Path(rbl_path).absolute().as_uri())

# Set our newly registered blueprint as default for our dataset
ds.set_default_blueprint_partition_id(blueprint_partition_id)


# Get a chance to connect to this server using the viewer
input(f"Server running on {server.address()}. Type enter to exit...")

@teh-cmc teh-cmc self-requested a review November 4, 2025 08:08
@abey79 abey79 merged commit d24048d into main Nov 4, 2025
38 of 41 checks passed
@abey79 abey79 deleted the antoine/oss-blueprint-dataset branch November 4, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants