You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Efficiently handling cell dependencies has become a major challenge in today's data analysis and computational notebook landscape. As cells are interconnected, modification in one can affect others, making it critical to have a reliable way to manage and track these relationships. Our objective is to implement a mechanism that can identify and navigate dependencies between cells, thus enhancing the user workflow and data integrity within the notebook.
Proposal
We will introduce a new execution command, "Execute cell with dependent cells," which will intelligently identify and manage the execution of a cell and its dependent cells in a notebook.
To archive this, we would experiment with following techniques:
Leveraging Language Server Information: Use symbols and references from the language server to map and establish the grammatical connections between cells.
In order to understand how data flows, we will rely on both symbol info (where symbols are defined) and also references (specifically, distinguishing between write and read references) from the language server. For example, if cell A defines a symbol which is utilized by cell B, any modification in cell A necessitates a re-run of cell B, indicating a dependency of B on A. Similarly, if cell A involves a write reference to a symbol and cell B encompasses a read reference of the same, it is construed that B is dependent on A.
Build Dependency Graph with cell execution states: Develop a dynamic dependency graph that updates in real-time as cells are modified or executed, using both symbol/references information and historical execution sequences.
UX
Add the command "Execute cell with dependent cells" to the Cell Execution Toolbar.
Provide visual cues, such as notebook cell decorations or status bar items, to indicate which cells are now "stale".
First experiment has been checked into the main branch, should be available in next prerelease. Pylance extension prerelease is required and also we need to enable the jupyter.executionAnalysis.enabled setting and then reload the window. Issues we currently ran into:
We are requesting symbols through vscode.executeDocumentSymbolProvider, but module imports are not seen as symbols. Cells that define module imports (e.g. import pandas as pd) are recognized by either symbol or reference requests.
Function definitions are seen as read references other than write. This is different from x = 1 where x is a write reference.
Background
Efficiently handling cell dependencies has become a major challenge in today's data analysis and computational notebook landscape. As cells are interconnected, modification in one can affect others, making it critical to have a reliable way to manage and track these relationships. Our objective is to implement a mechanism that can identify and navigate dependencies between cells, thus enhancing the user workflow and data integrity within the notebook.
Proposal
We will introduce a new execution command, "Execute cell with dependent cells," which will intelligently identify and manage the execution of a cell and its dependent cells in a notebook.
To archive this, we would experiment with following techniques:
write
andread
references) from the language server. For example, if cell A defines a symbol which is utilized by cell B, any modification in cell A necessitates a re-run of cell B, indicating a dependency of B on A. Similarly, if cell A involves a write reference to a symbol and cell B encompasses a read reference of the same, it is construed that B is dependent on A.UX
Related Issues
The text was updated successfully, but these errors were encountered: