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

Upstream only cell execution feature (cmd+k) overwrites untouched cell downstream dependencies #160

Open
quantum-byte opened this issue Mar 28, 2024 · 0 comments

Comments

@quantum-byte
Copy link

Hi,

i noticed a (for me) unexpected behaviour of the upstream only cell execution feature "(cmd+k shortcut).
It also overwrites (removes) any downstream dependencies of the executed cell. This leads to in my eyes unexpected behaviour because, if one then executes anything downstream it does not execute the correct upstream dependencies.

  1. Step 1 - As an example lets take the simpel Notebook:

0_start

Step 1 ipflow Notebook metadata.json

  1. Step 2 - Change the x= cell but do not execute it. Execute the z= cell with cmd+k:

1_z_cmd_k

Looks good but in the metadata you can already see that the upstream depency for the last cell with deps is removed.

Step 2 ipflow Notebook metadata.json

  1. Step 3 - Change the x= cell but do not execute it again. Execute the y= cell with cmd+k:

2_y_cmd_k

Looks also good but in the metadata you can see that the upstream depency for the z= cell is removed.

Step 3 ipflow Notebook metadata.json

  1. Step 4 - Change the x= cell but do not execute it again. Execute the z= cell with cmd+k:

3_z_cmd_k

This is now quite unexpected. I would assume that again every z upstream cell (x and y) get executed but only x is actually executed because due to Step 3 z is no longer a downstream dependency of y.

Step 4 ipflow Notebook metadata.json

Subsequent normal executions (cmd+enter) seem to repair that problem again one downstream dependency at a time. So the first normal execution and y= is executed and a second normal execution => the last deps cell is also executed.

This behaviour is to some degree understandable because one does not know if z cell still exists, if one only executes until y but is there some way to preserve such downstream deps metadata from previous executions or execute/build the dependency graph of the whole notebook also for partial (cmd + k) executions ?

Ipyflow Version: 0.0.200
Jupyter versions:

Selected Jupyter core packages...
IPython          : 8.22.2
ipykernel        : 6.29.3
ipywidgets       : 8.1.2
jupyter_client   : 8.6.1
jupyter_core     : 5.7.2
jupyter_server   : 2.13.0
jupyterlab       : 4.1.5
nbclient         : 0.10.0
nbconvert        : 7.16.3
nbformat         : 5.10.3
notebook         : 7.1.2
qtconsole        : 5.5.1
traitlets        : 5.14.2
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

No branches or pull requests

1 participant