-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
wait and resume execution on button press #803
Comments
Can you split you issue in two: 1. Clearly state the problem, 2. Your suggestion. I have found that it is difficult to discuss direct suggestions, but discussing the underlying problem leads to creative solutions. |
Sure :) Suppose I have a notebook that looks like the following ### A Pluto.jl notebook ###
# v0.12.18
using Markdown
using InteractiveUtils
# ╔═╡ c49493f2-4366-11eb-2969-b3fff0c37e7b
begin # load packages and other requirements
using ...
end
# ╔═╡ ba294c1c-43ab-11eb-0695-1147232dc62a
begin
# allow user to interactively change prepocessing params
@bind preprocessingParams ... # or more complicated binding of observables using JSServe.jl
data,labels = load(path)
# apply preprocessing params to data; typically fast and plot should be reactive
transform!(data, preprocessingParams...)
plot(data) # show summary statistics of preprocessed data; updates on changes to observables
end
# ╔═╡ 9dbf3d0c-4432-11eb-1170-4f59655b7820
begin # computationally expensive cell; updates every time preprocessing params are changed - not desirable!
outputs = train(data,labels)
end
# ╔═╡ b80a14f4-4435-11eb-07bd-7fcc8ca10325
begin # interactively explore outputs
@bind plotParams ...
plot(outputs,plotParams...)
end
# ╔═╡ Cell order:
# ╠═c49493f2-4366-11eb-2969-b3fff0c37e7b
# ╟─ba294c1c-43ab-11eb-0695-1147232dc62a
# ╟─9dbf3d0c-4432-11eb-1170-4f59655b7820
# ╟─b80a14f4-4435-11eb-07bd-7fcc8ca10325 The issue in this example is that the computationally expensive cell Proposed Solution:
Would treat the first two cells and the last two cells essentially as separate notebooks, with separate execution spaces. However when cell Not sure how this could be done in practice. One could use an |
I think this would also allow users to create larger notebooks - the size of a book for example - where each chapter or section in the book is treated as a separate execution space that (optionally) inherits the state from the previous section. This way when the user loads the notebook they don't have to wait until all cells in the book are executed before being able to interact with the first section of the book |
Can you take a close look at #298 ? It is a proposed solution to the same problem, so try to narrow down on how your suggestion is different and better. It sounds very similar to #298 (comment) |
will continue discussion on relevant thread :) |
[Diff since v0.12.18](v0.12.18...v0.12.19) **Closed issues:** - GPU usage and console messages (#685) - Feature Proposal: Exported HTML can be passed to a static site generator (#794) - wait and resume execution on button press (#803) - Latex code not appropriately displayed (#817) - Python doesn't work in Pluto (#818) - add pluto - pluto not found - Julia 1.5.3 macOS (#819) - Cell output not shown correctly if in-line comment ends with semicolon (#820) - _llvm (#821) - Can't move cells (#822) - Conditions on list comprehensions and execution order (#824) - Electron app (#825) - Errors when pressing Ctrl+C to stop Pluto (#827) - Failed to load notebook error (#829) - Popup docs don't work for some symbols (#832) - Running a notebook deleted contents of `.julia/registries` (#834) - Ctrl+C broken with `julia -e "Pluto.run()"` instead of the REPL (#836) - Edit or remove default header and footer in exported static PDF (#837) - Parameters.jl dynamically created macros confuse Pluto (#838) - Feature request: Open URL from terminal (#840) - Notebook gets stuck in forever loading state after restarting my PC while running it (#849) - Syntax highlighting of @. (#854) - File not found when file newly created while session is running (#855) - Weird output from a mix of MathJax, Markdown and PlutoUI (#856) - Misaligned plots when plotting with UnicodePlots.jl using BrailleCanvas (#870) **Merged pull requests:** - Pluto ux process file drop (#707) (@pankgeorg) - Dralbase state managment (#710) (@dralletje) - PLJ-785 CodeMirror Eject to TextArea - Reload from TextArea in Offline HTML export (#805) (@pankgeorg) - Dralbase state managment: Fix front-end tests (#809) (@pankgeorg) - Update README.md (#814) (@fonsp) - Regard `:=` in macros as einsum notation (take 2) (#816) (@mcabbott) - 🧸 Open your own files as samples (#828) (@fonsp) - Handle filters in generators, closes #824 (#839) (@Pangoraw) - Update `== nothing` to `=== nothing` in Parse.jl (#841) (@heetbeet)
suppose there are two sections in my notebook:
Ideally I would have a "Run Algorithm" button in the second section, where Pluto does not execute any code below the button - which contains heavyweight computations - and waits until I press it to execute it. Would this be possible? It would be nice to be able to separate out execution spaces.. Sometimes I just want to execute the first section without executing the second one at all, for example if I've changed my mind about the dataset I've loaded.
The text was updated successfully, but these errors were encountered: