Skip to content

Use marimo export session for session snapshots (and make embedding notebook GPU friendly)#63

Merged
akshayka merged 1 commit into
mainfrom
aka/gpu-aware
May 29, 2026
Merged

Use marimo export session for session snapshots (and make embedding notebook GPU friendly)#63
akshayka merged 1 commit into
mainfrom
aka/gpu-aware

Conversation

@akshayka

Copy link
Copy Markdown
Contributor

The session scripts reached into marimo internals to run notebooks and serialize snapshots, but internals changed recently. So, create-sessions.py is now a thin wrapper around marimo export session --sandbox.

The embeddings notebook is regenerated under the new tooling, which also folds in moving the computed embedding to CPU before plotting and a tight_layout call to make the full figure render.

The session scripts reached into marimo internals to run notebooks and
serialize snapshots, but internals changed recently.

`create-sessions.py` is now a thin wrapper around `marimo export session
--sandbox`.

The embeddings notebook is regenerated under the new tooling, which also
folds in moving the computed embedding to CPU before plotting and a
`tight_layout` call to make the full figure render.
Copilot AI review requested due to automatic review settings May 29, 2026 18:54

Copilot AI left a comment

Copy link
Copy Markdown

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 updates session snapshot tooling to use the supported marimo export session command and refreshes the embeddings notebook for newer marimo output/GPU-friendly plotting.

Changes:

  • Replaces custom session execution/serialization logic with a thin CLI wrapper around marimo export session --sandbox.
  • Updates session validation to compute freshness using marimo’s current session-cache hash helper.
  • Regenerates the embeddings notebook metadata and moves embeddings to CPU before plotting.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
scripts/validate-sessions.py Updates notebook discovery and session freshness hashing for newer marimo session exports.
scripts/create-sessions.py Simplifies snapshot generation by delegating to marimo export session --sandbox.
scripts/create-sessions-changed.sh Narrows changed-file discovery to notebook paths before regenerating sessions in parallel.
notebooks/algorithms/visualizing-embeddings.py Updates marimo generation metadata and adjusts plotting for CPU/tight layout.

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

Comment thread notebooks/algorithms/visualizing-embeddings.py
@akshayka akshayka merged commit d060fd3 into main May 29, 2026
3 checks passed
@akshayka akshayka deleted the aka/gpu-aware branch May 29, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants