ipython / ipython/ipykernel

Cell-level caching

未關閉
#992 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
734
分支
412
平均合併
1 天 5 小時
30 天內合併 PR
8

描述

Often we want to visualize the content of the notebook for example as an HTML and also recompute it to check its validity. This ensures that the notebook is runnable and also shows the desired output. However, running a notebook is very time-consuming. It would be great if we had some cell-level cache that would speed up repeated executing of the notebook.

@davidbrochart in his project [akernel](https://github.com/davidbrochart/akernel) (asynchronous kernel) solved a similar issue. He approached it by parsing inputs and outputs of the cached cell using `ast` module. He could then skip the execution of the particular time-consuming cell, if the outputs were cached and the inputs hasn't changed from the previous execution. I hope I didn't misinterpret it. @davidbrochart please comment on any of my mistake.
An inspiration could also be taken from [knitr](https://github.com/yihui/knitr) from R, who has this implementation available.

Could we get something like this for ipykernel? Many popular projects would benefit from this improvement, such as Quarto or JupyterBook.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。