ipycache icon indicating copy to clipboard operation
ipycache copied to clipboard

Option to automatically save newly created variables in the cell

Open rossant opened this issue 12 years ago • 6 comments

%%cache [file] --autovars automatically detects the variables that have been created in the cell, by looking at the namespace dictionaries before and after the cell's execution.

rossant avatar Oct 13 '13 17:10 rossant

What if the user really don't want to cache any variable (e.g., because they are too large in memory and are useless in the subsequent cells) except for the rich output?

herrlich10 avatar Oct 22 '13 15:10 herrlich10

@herrlich10 good point. I've updated the issue. Not sure about the option name: any suggestion?

rossant avatar Oct 22 '13 15:10 rossant

Do you mean --autovars? I think its fine. What about --infer, maybe not specific enough?

herrlich10 avatar Oct 23 '13 04:10 herrlich10

How about --all?

lpmp

On Wed, Oct 23, 2013 at 5:55 AM, herrlich10 [email protected]:

Do you mean --autovars? I think its fine. What about --infer, maybe less specific?

— Reply to this email directly or view it on GitHubhttps://github.com/rossant/ipycache/issues/8#issuecomment-26880605 .

mpelko avatar Oct 23 '13 07:10 mpelko

How about --all?

It may mean "all variables in the namespace" whereas I rather mean "all new variables in the cell. That being said we could have "--all" for all variables, and something else for the variables that have just been created.

rossant avatar Oct 23 '13 07:10 rossant

Fair point, --allnew would then sound most intuitive to me (as in @@cache --allnew).

lpmp

On Wed, Oct 23, 2013 at 8:26 AM, Cyrille Rossant [email protected]:

How about --all?

It may mean "all variables in the namespace" whereas I rather mean "all * new* variables in the cell. That being said we could have "--all" for *all

  • variables, and something else for the variables that have just been created.

— Reply to this email directly or view it on GitHubhttps://github.com/rossant/ipycache/issues/8#issuecomment-26885260 .

mpelko avatar Oct 23 '13 07:10 mpelko