-
Notifications
You must be signed in to change notification settings - Fork 158
Description
For a long time, people have struggled with Jupyter notebooks and version control. One complicating factor causing churn in notebooks is when output is saved. For example, in ipywidgets we finally insisted on our example notebooks always being saved only after clearing any outputs to prevent churn in the repo. Saving output can also trigger security or business concerns in certain situations as well. There are many situations when a user would like to indicate to the system that a particular notebook should be saved with only the inputs and outputs should be stripped out.
What do people think of having a new notebook-level metadata key that indicates the user wishes to only save inputs, i.e., the user wishes to effectively clear the outputs before saving? Perhaps jupyter.exclude_outputs
, which if true, is an explicit user hint to the tool saving the notebook that it should strip outputs before saving.
Not all tools would obey this hint. For example, I imagine that nbconvert would save outputs if the appropriate options were given, regardless of this hint. However, I think it would be great if JupyterLab/Jupyter Notebook and other frontends could respect the setting.
Disclaimer: we are also looking at how outputs are saved in Jupyter notebook exports at Databricks, where users may have a business need to indicate outputs should not be saved in a notebook.