-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Settings for controlling if outputs should be saved to disk #124551
Comments
(Experimental duplicate detection) |
I doubt so,
if we are talking about serializing the content and saving to disk, then it's the responsibility of the content serializer. VS Code has no idea how the outputs will be used to generate the final file format. If we ever implement something in the core, there are many open questions:
In Kusto extension, IIRC if users set not to save outputs, then we also make the |
Yeah, I don't believe that it can be done. The closest request we have is support for transient per output-instance, not per notebook type: #120600 |
I don't have this case where I'm not saving outputs yet (no request yet) but this case might be possible from core by not giving output cell items in NotebookData when the serialize function is called? So far though I don't have such a feature planned |
+1 |
I came looking for this. Sad to see it hasn't got much enthusiasm. I also want it
|
This comment was marked as spam.
This comment was marked as spam.
It would be best to expose an ability to filter what get's saved, NBDEV that facilitate building python libraries in notebooks in literate programming, has special comment markup to remove only some outputs. I would love to be able to run the same hook that is already implemented for Jupyter in vscode. |
Does anybody know if this can be made possible by using the new Notebook: Code Actions On Save setting? |
Workaround: add a git filter so that in the middle of committing, the notebook is intercepted and the outputs are removed before they are saved by git. The outputs are still saved to disk locally, so you can still see them, but when you git push the outputs won't be included, or if you git checkout a different commit, you won't see the outputs there. See this gist (PS, run |
This is a big issue when you working on remote SSH with Jupyter Notebook files. During the VSCode's "save" action, a notebook that contains variables/data frames with a large amount of data in the output is written to the remote file. Sometimes this can cause VSCode to crash or wait a few minutes to finish the save action. It would be helpful If you could add an option to disable saving the notebook output to the file and keep it only in the memory during the session. |
This issue has been open for over 2 years and we have received very few votes on this. |
Originally filed here by @rebornix microsoft/vscode-jupyter#4670
I think we should consider adding this feature into VSCode. I've implemented this same feature in Kusto notebooks.
Feels like something generic for VS Code.
Similar to having a cell toolbar position per viewtype, we can have
Save Notebook Outputs
per viewtype. This can be achieved easily from VS Code by passing an empty array into the serializer, when saving notebooks.I personally think this would be useful for rest notebooks as well, one might want the output from the REST & GithubIssues Notebook to be saved in the notebook, just like kusto notebooks (some might want the charts/data & some might not).
Thus all notebooks can be considered serializable (including output for sharing) & user choses whether the output is to be persisted on disc or not.
E.g. with .NET team building their notebook format (*.dib) this would have to be impelemented yet again in their extension.
@rebornix /cc
The text was updated successfully, but these errors were encountered: