Skip to content

Help rework code to prevent kernel crash? #166

Answered by TomAugspurger
shijithpk asked this question in Q&A
Discussion options

You must be logged in to vote

Most likely you are hitting the memory limit of the notebook server node. The taskbar at the bottom should give you an indication of whether that's true.

If so, you'll want to find out where the memory usage is spiking. You can either do that manually, by stepping through your code line-by-line, or use a memory profiler. I've used https://pypi.org/project/memory-profiler/, and https://bloomberg.github.io/memray/ is supposed to be nice.

Once you've determined where the issue is Dask might be able to help. I'm not sure if the functions you're using work well with Dask arrays (i.e. without converting them to a single large NumPy array), but the memory profiler should be able to help there.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@shijithpk
Comment options

Answer selected by shijithpk
Comment options

You must be logged in to vote
1 reply
@shijithpk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants