Repository navigation
How to make figure output durable? #8728
Replies: 2 comments
|
|
A marimo notebook is a plain In the marimo editor ( # marimo.toml (find it with `marimo config show`), or [tool.marimo.runtime] in pyproject.toml
[runtime]
auto_instantiate = falseThe snapshot is only reused if the cell code, cell ids, marimo version and PEP 723 dependencies are unchanged. Edit a cell or upgrade marimo and you have to run again. You can also write the snapshot explicitly with Make the re-run cheap instead: if what you want to avoid is redoing the slow part, cache it on disk so a rerun only redraws the figure: with mo.persistent_cache(name="my_results"):
results = expensive_computation()
I haven't checked whether the VS Code extension reads the |
Uh oh!
There was an error while loading. Please reload this page.
I use marimo in VS Code, I now rely on static figure instead of interactive figure. I'll save my figure (mostly made by matplotlib). But when I reopen my marimo notebook, the figure are no longer attached in the output. I have to rerun the whole notebook.
All reactions