Comments (10)
E.g. if you start jupyter go to the end of the document and press cmd-k it doesn't work. I imagine this might be a "deep plumbing issue however"...
We can't infer dependencies as accurately as we do without watching the notebook execute, which is why it doesn't work when you start fresh. However, I think what we could do is persist the dependencies in a previous session in the notebook metadata, and we would likely get what you're looking for (tracked in #144).
from ipyflow.
Ah, "pull-based" reactivity rather than "push-based". I've thought about it before as well -- should be possible to support, in theory. It's a bit tricky because the previous dependency structure can change -- that's why for pushed-based, we don't decide up front everything that we want to execute, just what to execute next. I think for pull-based, the simplest thing to do would be to decide the full set of cells to execute ahead-of-time, and maybe stop if there's an an exception thrown in the middle.
from ipyflow.
Oh, I guess you are looking for static + pull-based, since the notebook hasn't been executed yet. ipyflow depends pretty heavily on dynamic analysis to determine the dependencies, but does have some limited static slicing capabilities that could potentially suffice here. Kind of up in the air whether it's good enough though.
from ipyflow.
Good news; the next version of ipyflow will support this (in JupyterLab and notebook 7 at least; maybe not in legacy notebook 6).
from ipyflow.
Ooh exciting. I'll be keen to test this out once it is released!
from ipyflow.
This should be working now that notebook 7 is out and the next version of ipyflow is out. You can run cmd+k / ctrl+k to execute the backward slice up to and including a cell. I'll leave this issue open until it's properly documented.
EDIT: to upgrade pip install --upgrade ipyflow
from ipyflow.
ooh exciting. Will try to give it a try when the need next arises.
from ipyflow.
Had a play with this. worked as expected. I think I had to restart jupyter to get the cmd-k binding to work.
I noticed you had to do a complete recalc before dependencies got calculated. E.g. if you start jupyter go to the end of the document and press cmd-k it doesn't work. I imagine this might be a "deep plumbing issue however"...
from ipyflow.
Yep, persisting dependencies would work. As a rule I'll always execute cells when I first write them, but I might want to reopen a notebook and execute just one cell and the things that it depends on.
from ipyflow.
Good news! In the latest release, we're now persisting the dependencies in the notebook metadata (for notebook7 and jupyterlab), so you should be able to resume a previous session and execute everything a downstream cell needs (with the cmd+k shortcut) without extraneous stuff now.
Still going to leave this issue open while I figure out the documentation story.
EDIT:
can be installed with pip install --upgrade ipyflow
One thing to mention: it won't work on older notebooks using nbformat < 4.5, since these don't persist the cell id with each cell. New notebooks created by the new versions of jupyter[lab] should all be >= 4.5 by default.
from ipyflow.
Related Issues (20)
- circular dependency on tracer -> cell ast -> tracer HOT 1
- Does this work in VSCode? HOT 1
- use html widget for code function with buttons for copy / scroll to cell
- vscode extension that implements notebook dataflow protocol
- Overlaping names collide HOT 2
- run_line_magic with local scope HOT 1
- add time travel slider to code widget
- register comm target on frontend for allowing non-ipyflow kernels to broadcast capabilities HOT 1
- add to conda-forge HOT 1
- Creating Cell Flow Graph Without Ipython HOT 11
- add kernel hook for after execute_reply sent
- add batch reactivity mode
- make basic execution path jupyter-agnostic by inheriting InteractiveShell HOT 2
- improve %load_ext to work with other kernels that wrap IPythonKernel
- [lab] enable reactive execution for "run selected"
- allow tracing to resume during function execution HOT 2
- persist dependencies in notebook metadata and apply after notebook restarts HOT 1
- certain cell executions produce "file changed on disk" popup HOT 1
- add button or hotkey for fusing all cells in forward / backward / full slice into one cell
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipyflow.