rossant / ipycache

Defines a %%cache cell magic in the IPython notebook to cache results of long-lasting computations in a persistent pickle file
BSD 3-Clause "New" or "Revised" License
139 stars 35 forks source link

Caching a whole notebook #39

Open Phyks opened 8 years ago

Phyks commented 8 years ago

Hi,

What about enabling caching of a whole notebook? With special magic, all the cells would be automatically cached and the user would not have to think about it in each cell. This could be especially useful as we may not be aware in advance of the time a calculation will take.

I think this could be some magic on top of https://github.com/rossant/ipycache/issues/13.

P.S.: Another approach, if you do not want to implement a global caching, would be to check calculation time for each cell, and if it exceeds a given threshold, to automatically cache the cell. However, I am not sure iPython provides this info.

IamGianluca commented 6 years ago

This would be indeed a very useful feature for those of us that work on a daily basis on notebooks requiring heavy computations.