Conversation
|
Web viewer built successfully.
View image diff on kitdiff. Note: This comment is updated whenever you push a commit. |
There was a problem hiding this comment.
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_datasetto 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_entriesto 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.
|
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 I'll try to make one and hand it off to @ntjohnson1. |
Actually, glad you asked. Finding bugs 😅 |
|
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...") |
# Conflicts: # crates/store/re_redap_tests/src/tests/common.rs
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.