Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blueprint.save is very hard to find / needs doc #7858

Open
teh-cmc opened this issue Oct 22, 2024 · 1 comment
Open

Blueprint.save is very hard to find / needs doc #7858

teh-cmc opened this issue Oct 22, 2024 · 1 comment
Assignees
Labels
😤 annoying Something in the UI / SDK is annoying to use 🟦 blueprint The data that defines our UI 🪳 bug Something isn't working 🐍 Python API Python logging API

Comments

@teh-cmc
Copy link
Member

teh-cmc commented Oct 22, 2024

I want to save a blueprint to a file for later use (e.g. from another language).

Saving the blueprint from the viewer (Menu > Save blueprint) works fine, but doing it from code leads to issues:

import sys

import rerun as rr
import rerun.blueprint as rrb

path_to_rbl = sys.argv[1]

rr.init("rerun_example_dataframe")
rr.save(path_to_rbl)

blueprint = rrb.Blueprint(
    rrb.DataframeView(
        origin="/",
        query=rrb.archetypes.DataframeQuery(
            timeline="log_time",
            apply_latest_at=True,
        ),
    ),
)

rr.send_blueprint(blueprint)

# The output .rbl file now contains an empty data recording too :(

The problem is that this also initializes an empty data recording (i.e. SetStoreInfo is fired), and therefore loading that blueprint later one will create an empty recording in the viewer, switch focus to it, etc. Makes the whole workflow unusable in practice.

How can we only save the blueprint using the API?

@teh-cmc teh-cmc added 🪳 bug Something isn't working 🐍 Python API Python logging API 😤 annoying Something in the UI / SDK is annoying to use 🟦 blueprint The data that defines our UI labels Oct 22, 2024
@teh-cmc
Copy link
Member Author

teh-cmc commented Oct 22, 2024

@jleibs tells me there is: https://ref.rerun.io/docs/python/0.19.0/common/blueprint_apis/#rerun.blueprint.Blueprint.save

It's just hard to find right now.

I'll slip a word regarding this in my upcoming "re-use blueprints across languages" thingy.

@teh-cmc teh-cmc changed the title No way to save just a blueprint from the API Blueprint.save is very hard to find / needs doc Oct 22, 2024
@teh-cmc teh-cmc self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😤 annoying Something in the UI / SDK is annoying to use 🟦 blueprint The data that defines our UI 🪳 bug Something isn't working 🐍 Python API Python logging API
Projects
None yet
Development

No branches or pull requests

1 participant