[llvm][TableGen][Jupyter] Add configurable default reset behaviour
Often you are doing one of 2 things: * Building a larger example from many small cells. * Showing many small isolated examples. The default so far has followed iPython, where cells are connected by default (in its case, the interpreter state backing them sticks around). This change adds a new magic `%config` where you can change the setting `cellreset` to change that behaviour (this is currently the only setting). Also added is a `%noreset` magic so that along with `%reset` you can override the default for one particular cell. The default is equivalent to `%config cellreset off`. If you then wanted to reset in a cell, you can just do %reset to override it. (this is what the current notebooks do) If you instead do `%config cellreset on`, cells always reset and you can choose not to using `%noreset`. The setting is named `cellreset` not `reset` to differentiate it a bit more from the one off command `reset`. The demo notebook has been updated with examples of this in action. Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D149055
Loading
Please sign in to comment