Under Windows 10 I have a Jupyter notebook that I am not able anymore to open because the browser reaches the "out of memory" state. The system resources tool confirms this: reaching 85% of used RAM the process is stopped. The last time I used the notebook there were a lot of rendered charts and some heavy dataframe populated. The feeling is that they are still there and once the notebook is opened again Jupyter tries to load also the full data and all the images. I need at least an easy way to not lose all the code in between. Is there a way to open the notebook in a "safe mode" so that images and dataframe are not loaded?
Open Jupyter notebook without render images and without popolating dataframes - safe mode loading preventing out of memory state
395 Views Asked by fede72bari At
1
There are 1 best solutions below
Related Questions in PYTHON
- php Variable name must change in for loop
- register_shutdown_function is not getting called
- Query returning zero rows despite entries existing
- Retrieving *number* pages by page id
- Automatically closing tags in form input?
- How to resize images with PHP PARSE SDK
- how to send email from localhost using codeigniter?
- Mariadb max Error while sending QUERY packet PID
- Multiusers login redirect different page in php
- Imaginary folder when I use "DirectoryIterator" in PHP?
Related Questions in OUT-OF-MEMORY
- php Variable name must change in for loop
- register_shutdown_function is not getting called
- Query returning zero rows despite entries existing
- Retrieving *number* pages by page id
- Automatically closing tags in form input?
- How to resize images with PHP PARSE SDK
- how to send email from localhost using codeigniter?
- Mariadb max Error while sending QUERY packet PID
- Multiusers login redirect different page in php
- Imaginary folder when I use "DirectoryIterator" in PHP?
Related Questions in JUPYTER
- php Variable name must change in for loop
- register_shutdown_function is not getting called
- Query returning zero rows despite entries existing
- Retrieving *number* pages by page id
- Automatically closing tags in form input?
- How to resize images with PHP PARSE SDK
- how to send email from localhost using codeigniter?
- Mariadb max Error while sending QUERY packet PID
- Multiusers login redirect different page in php
- Imaginary folder when I use "DirectoryIterator" in PHP?
Related Questions in SAFE-MODE
- php Variable name must change in for loop
- register_shutdown_function is not getting called
- Query returning zero rows despite entries existing
- Retrieving *number* pages by page id
- Automatically closing tags in form input?
- How to resize images with PHP PARSE SDK
- how to send email from localhost using codeigniter?
- Mariadb max Error while sending QUERY packet PID
- Multiusers login redirect different page in php
- Imaginary folder when I use "DirectoryIterator" in PHP?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can copy your notebook to a new file and then clean the output from that. The clean version should then allow you to open it and access your code easily if indeed the output stored was the problem. (The copying is important because you don't want to clobber your original
.ipynb
file containing the intact output as it probably was an effort to come by.)To see nbclean in action stripping output from a test notebook:
Go here and click
launch binder
under 'Example'.In the session that comes up run the following in a notebook cell:
Then using Jupyter compare the file
test_notebook.ipynb
totest_notebook_cleaned.ipynb
.Then adapt the code to the copy of your notebook. (If you want to do it on your machine, you'll need to run
%pip install nbclean
in a cell in your notebook first. You may have to do it on your machine or a more substantial remote system than MyBinder provides if your file is too large to upload to sessions running via MyBinder.) The clean version hopefully opens just fine for you.nbclean is based on nbformat (find intro at top of here), which would also allow you to do this, I have some examples of various applications of nbformat with code among answers here and here.
Recipe for using
jupyter nbconvert
to clear outputsThere's also clean_ipynb and nb-clean.
UPDATE: The OP found nb-clean nice because could install using conda or pip and use single line to act on the notebook:
(Because that command runs in place, make sure you use a copy if you care about what was among the output.)
Alternatively, you can convert the notebook to a script using Jupytext on the command line. That would allow you to access the code in it as well.