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

Introduce rr.notebook_show() to simplify notebook experience #5715

Merged
merged 21 commits into from
Mar 28, 2024

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Mar 28, 2024

What

As part of adding blueprint support to notebooks, I realized the experience of creating and logging memory recordings felt very incongruous with the normal rerun workflow.

I introduced a new mechanism rr.notebook_show(), which uses the MemoryRecording behind the scenes, but doesn't require users to be aware of it.

All Blueprint types now support _repr_html_ and show the currently active recording stream.

Uncovered several existing sharp-corners with notebooks:

  • MemoryStream was still generating spurious warnings about dropped messages, which I cleaned up.
  • The notebook was using random for its identifiers, which, in the case of examples was having its seed reset, leading to duplicate ids in the DOM.

Lastly, updated the notebook cube example to use the new style:

image

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@jleibs jleibs added 🟦 blueprint The data that defines our UI notebook Jupyter notebooks etc include in changelog labels Mar 28, 2024
@jleibs jleibs marked this pull request as ready for review March 28, 2024 00:32
@jleibs jleibs force-pushed the jleibs/blueprint_notebook branch from 2cee302 to 07647f0 Compare March 28, 2024 01:02
@abey79 abey79 changed the title Introduce rr.show_notebook() to simplify notebook experience Introduce rr.notebook_show() to simplify notebook experience Mar 28, 2024
@teh-cmc teh-cmc self-requested a review March 28, 2024 08:06
Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

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

Nice!

  • Almost feels like we should add a check to the release checklist which is basically just a readme saying "run the notebook example!".
  • The notebook example's README still mention rr.memory_recording and such.

The last two cells fail with the following for me:
image

even though I'm running everything off of your branch and going through the local webserver:
image

Also I don't understand how I can have a version mismatch if it's all running off of this branch? 🤔


The embedded viewer is constantly saying Waiting for data... even though the data has been loaded:
image


Finally, clicking on the Rerun icon in the top left (the main menu) will always crash the view:
image


I'm starting to feel like all of these issues are the result of that version mismatch and that I must be doing something wrong but I can't see what?

.typos.toml Outdated Show resolved Hide resolved
@teh-cmc
Copy link
Member

teh-cmc commented Mar 28, 2024

I'm starting to feel like all of these issues are the result of that version mismatch and that I must be doing something wrong but I can't see what?

That was indeed the case.

I had to run cargo run -p re_build_web_viewer manually in addition to the usual just py-build --features web-viewer, I always forget what is and isn't manual these days... (thanks @jleibs).

This fixes my versioning issues, the last two cells, and even the menu crash! Only the "waiting for data" thingy is left.

@jleibs jleibs merged commit 8c0d389 into main Mar 28, 2024
34 checks passed
@jleibs jleibs deleted the jleibs/blueprint_notebook branch March 28, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🟦 blueprint The data that defines our UI include in changelog notebook Jupyter notebooks etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants