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
138 stars 35 forks source link

Should fail if not all variables could be saved/loaded? #2

Closed mpelko closed 11 years ago

mpelko commented 11 years ago

I tried the code using commas between the variable names (by accident) %%cache myvars.pkl a, b, c

This will only save c (and will give out warnings about not finding a,, b,, in the namespace).

Upon rerunning the code, it will only load c and not throw an error again.

I would suggest the default behaviour should be to throw out a warning if the process of saving all specified variables failed and to make sure the cell is not skipped in the case it is rerun later.

Great and very useful package!!!

rossant commented 11 years ago

You're right. The latest version of ipycache (0.1.2) now raises errors if some variables could not be loaded or saved. In addition, the cell magic is now resilient to the syntax "a, b, c" instead of "a b c" as it's probably a frequent "accident"! Closing, thanks for the report.