Skip to content

feat: add lazy cache blob types (arrow, npy)#9035

Merged
dmadisetti merged 8 commits intomainfrom
dm/lazy-miss
Apr 15, 2026
Merged

feat: add lazy cache blob types (arrow, npy)#9035
dmadisetti merged 8 commits intomainfrom
dm/lazy-miss

Conversation

@dmadisetti
Copy link
Copy Markdown
Collaborator

📝 Summary

Fixes a bug where a lazy cache blob miss blocked execution. Additionally adds arrow and npz formats over pickle for type relevant storage.

Copilot AI review requested due to automatic review settings April 3, 2026 21:16
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Apr 15, 2026 7:29pm

Request Review

@dmadisetti dmadisetti changed the title feat: Lazy cache blobs feat: add lazy cache blob types (arrow, npy) Apr 3, 2026
Copy link
Copy Markdown
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 fixes lazy-cache restore behavior so missing blob references don’t stall execution, and extends lazy-cache blob serialization to support format-aware storage (NumPy and Arrow) in addition to pickle.

Changes:

  • Update lazy loader restore path to parallelize blob reads with explicit “missing blob” signaling.
  • Introduce format registries for blob serialization/deserialization (pickle / “npz” / Arrow) plus per-item type_hint metadata.
  • Add round-trip tests for NumPy, polars, and pandas cached values.

Reviewed changes

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

Show a summary per file
File Description
marimo/_save/loaders/lazy.py Adds loader-strategy resolution, format-aware blob (de)serialization, and updated parallel restore behavior.
marimo/_save/stubs/lazy_stub.py Defines loader-strategy registry and blob serializer/deserializer registries; adds type_hint to manifest schema.
marimo/_save/stubs/stubs.py Extracts shared mro_lookup() helper for MRO-based registry lookups.
marimo/_save/stubs/__init__.py Rewires stub registration to use mro_lookup() and re-exports relevant symbols.
tests/_save/loaders/test_loader.py Adds format round-trip tests for numpy/polars/pandas lazy-cache storage.

Comment thread marimo/_save/loaders/lazy.py
Comment thread marimo/_save/loaders/lazy.py Outdated
Comment thread marimo/_save/stubs/lazy_stub.py Outdated
Comment thread marimo/_save/stubs/lazy_stub.py Outdated
Comment thread marimo/_save/stubs/lazy_stub.py
Comment thread marimo/_save/stubs/stubs.py Outdated
Comment thread tests/_save/loaders/test_loader.py
@mscolnick mscolnick added the enhancement New feature or request label Apr 3, 2026
Copy link
Copy Markdown
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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Comment thread marimo/_save/stubs/lazy_stub.py
Comment thread marimo/_save/stubs/lazy_stub.py
Comment thread marimo/_save/stubs/lazy_stub.py Outdated
Comment thread marimo/_save/stubs/lazy_stub.py
Comment thread marimo/_save/loaders/lazy.py Outdated
Comment thread tests/_save/loaders/test_loader.py
@dmadisetti dmadisetti requested a review from mscolnick April 9, 2026 21:59
mscolnick
mscolnick previously approved these changes Apr 13, 2026
@dmadisetti dmadisetti requested a review from peter-gy April 15, 2026 19:10
@dmadisetti dmadisetti merged commit 6baa22d into main Apr 15, 2026
44 checks passed
@dmadisetti dmadisetti deleted the dm/lazy-miss branch April 15, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants