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.

Dead kernel when computing neighbours

See original GitHub issue

Good day,

I am having a problem running scVelo. I am doing all the preprocessing steps in Seurat (integrated two different samples), and then, I exported the loom file and read it into scVelo successfully. Then I combined the loom files obtained after running velocyto into one using loompy.combine. I can merge both objects using scv.utils.merge without losing any cells, and the AnnData object seems ok to me (I am new using python for single-cell RNA processing so that I may be wrong). However, the problem comes when I want to run scv.tl.velocity. The command will start the normalization, but once it starts to compute the neighbors, it kills the kernel.

I am working on an HPC and have tried increasing the number of cores and memory (12 cores and 256GB), thinking that that could be the problem, but still, the problem occurs again. the dataset is not huge (AnnData object with n_obs × n_vars = 14542 × 17586), so I do not have any clue where the problem is. I have run the pipeline with non-merged samples, and it finishes with no issues.

I am quite puzzled about where the problem could be. I am sorry if this is a trivial question. I hope you may have some ideas about how to solve it.

Thanks in advance.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:29 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
picciamacommented, Jun 10, 2020

I found my problem and it seems unrelated to obsp: I can calculate neighbors when calling moments() only once. The second time it fails with the dead kernel issue. I noticed that within the executed cell in my notebook, scv.logging.print_version() is called. As soon as I removed that line, I could calculate moments/neighbors repeatedly without any problem. It seems as if scv.logging.print_version() must not be called again after neighbors() was called at least once. In my case, this was an unfortunate combination of a for loop and multiple anndata objects.

Steps to reproduce:

  1. first call scv.pp.moments()
  2. then call scv.logging.print_version()
  3. call scv.pp.moments() again, either on the same or a different object <- kernel death

The line the kernel dies is this one here: https://github.com/theislab/scvelo/blob/4395ae0e4ecf0452a100488692205bd054e3c009/scvelo/preprocessing/neighbors.py#L144

I checked and observed this behavior with scvelo from 0.1.9 to the lastest dev version. Though this special case I report is likely never to occur, there might be a general problem with the logging mechanism. However, the issue can be settled in my opinion.

0reactions
whosnothungrycommented, Jul 23, 2020

I found my problem and it seems unrelated to obsp: I can calculate neighbors when calling moments() only once. The second time it fails with the dead kernel issue. I noticed that within the executed cell in my notebook, scv.logging.print_version() is called. As soon as I removed that line, I could calculate moments/neighbors repeatedly without any problem. It seems as if scv.logging.print_version() must not be called again after neighbors() was called at least once. In my case, this was an unfortunate combination of a for loop and multiple anndata objects.

Steps to reproduce:

  1. first call scv.pp.moments()
  2. then call scv.logging.print_version()
  3. call scv.pp.moments() again, either on the same or a different object <- kernel death

The line the kernel dies is this one here: https://github.com/theislab/scvelo/blob/4395ae0e4ecf0452a100488692205bd054e3c009/scvelo/preprocessing/neighbors.py#L144

I checked and observed this behavior with scvelo from 0.1.9 to the lastest dev version. Though this special case I report is likely never to occur, there might be a general problem with the logging mechanism. However, the issue can be settled in my opinion.

Same solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter Notebook kernel dies while compiling Neural Network
While creating and compiling a keras Dense Neural Network my jupyter notebook kernel always dies. The terminal gives me a message that it ......
Read more >
the kernel crashed while executing code in the the current cell ...
hello everybody I'm trying to use monai but when I import it this error shows up. "The kernel appears to have died. It...
Read more >
The kernel appears to have died | Data Science and ... - Kaggle
My kernel dies whenever I run mode.fit on my cnn model using keras within jupyter notebook. Any idea what might be causing this?...
Read more >
Linux Kernel Networkingна advanced topics: Neighboring and ...
send before that neighbour is considered dead. ○. Theанk parameter tells the kernel not to send ARP broadcast; in such case, the arpd...
Read more >
One-dimensional cellular automata - Rosetta Code
000 -> 0 # 001 -> 0 # 010 -> 0 # Dies without enough neighbours 011 ... USING: bit-arrays io kernel locals...
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