question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VS Code crashes when running a cell that produces a lot of output

See original GitHub issue

I am trying to print model summary in tensorflow and I think the model is large and it’s crashing my notebook. The model is ResNet101.

image

The whole computer comes to a halt, memory usage goes up to 99% and VS Code crashes. I have 16 GB of ram, so I didn’t think printing something large would actually eat all my ram. Also, because the kernel crashes, all the variables are lost like history = model.fit() which I need to fine-tune the model afterwards. Moreover, I need to print base_model summary in order to choose from which layer to fine-tune from.

Is there a way to print the summary in another way and save the entire notebook with the variables, so I can continue working? I have checkpoints for model weights, but I need to keep track of past epochs through history to resume training afterwards.

I will try using.py files, but I want to know if there is a way to solve this problem for jupyter.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:34 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, Nov 13, 2022

hi everyone which, but this should be fixed in the next release (we were unable to take last month).

you can try installing the latest pre-release version of the jupyter extension and that should work.

1reaction
mariosconstacommented, Sep 8, 2022

Currently the extension host seems to crash due to the size of the output generated.

@DonJayamanne by the way, if you saw the recording in the demo2.zip, I printed only the layers of the model using a for loop, which is a very long list of text, and it runs instantly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code crashes constantly when working with ...
1 Answer 1 · It means that your kernel is still running. You can manually stopping the kernel by pressing the stop button...
Read more >
5 Troubleshoot System Crashes
Information and guidance about some specific procedures for troubleshooting system crashes. A crash, or fatal error, causes a process to terminate ...
Read more >
Python in Visual Studio Code – May 2022 Release
To make it more obvious when a kernel has crashed, the extension now displays this information in cell output. There is now troubleshooting ......
Read more >
January 2021 (version 1.53) - Visual Studio Code
Learn what is new in the Visual Studio Code January 2021 Release (1.53)
Read more >
Python Crashing: Process finished with exit code
There is no change in crashing frequency or exit code when I clear all the outputs before running the program again.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found