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

fix: partially instantiate notebooks when autorun on startup is disabled #3316

Merged
merged 6 commits into from
Dec 31, 2024

Conversation

akshayka
Copy link
Contributor

@akshayka akshayka commented Dec 30, 2024

When autorun on startup is disabled, running a cell should only run its uninstantiated ancestors, and in particular it shouldn't run the uninstantiated descendants of uninstantiated ancestors.

This lets the notebook author incrementally run parts of their notebook on startup, even those that include UI elements, without making the entire notebook lazy.

Previously, running a cell would collect uninstantiated ancestors but also uninstantiated descendants, which would often be the entire notebook since uninstantiated ancestors often include imports.

This fix was implemented by keeping track of which execution requests are uninstantiated. This data structure is pruned as cells are run or deleted.

Copy link

vercel bot commented Dec 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 31, 2024 0:09am
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 31, 2024 0:09am

@akshayka akshayka merged commit b7d47e4 into main Dec 31, 2024
33 checks passed
@akshayka akshayka deleted the aka/fix-autorun-startup-instantiation-logic branch December 31, 2024 00:18
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.

1 participant