Skip to content
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

[BUG] Kernel crashes when running the example #415

Open
priya-velu5 opened this issue May 7, 2024 · 4 comments
Open

[BUG] Kernel crashes when running the example #415

priya-velu5 opened this issue May 7, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@priya-velu5
Copy link

Kernel crashes when running the example

To Reproduce
Followed the installation steps by creating a separate conda environment, installed brainglobe and cellfinder with napari.

Log file
kernel outputs:
11:14:38.025 [info] Cell 2 completed in 5.643s (start: 1715105672381, end: 1715105678024)
11:14:58.376 [info] Cell 2 completed in 1715105678.024s (start: undefined, end: 1715105678024)
11:14:59.192 [info] Cell 2 completed in 0s (start: undefined, end: undefined)
11:15:00.210 [error] Disposing session as kernel process died ExitCode: undefined, Reason:
11:15:00.225 [info] Cell 2 completed in 0s (start: undefined, end: undefined)
11:18:14.973 [error] Failed to write data to the kernel channel shell [
<Buffer 3c 49 44 53 7c 4d 53 47 3e>,
<Buffer 32 62 32 32 61 38 65 64 66 35 30 63 30 38 36 35 35 66 39 65 37 33 39 38 38 64 30 31 32 64 33 65 34 34 61 37 66 38 66 61 62 64 33 35 65 39 33 35 31 35 ... 14 more bytes>,
<Buffer 7b 22 64 61 74 65 22 3a 22 32 30 32 34 2d 30 35 2d 30 37 54 31 38 3a 31 38 3a 31 34 2e 39 37 32 5a 22 2c 22 6d 73 67 5f 69 64 22 3a 22 30 39 31 38 33 ... 177 more bytes>,
<Buffer 7b 7d>,
<Buffer 7b 7d>,
<Buffer 7b 22 73 69 6c 65 6e 74 22 3a 66 61 6c 73 65 2c 22 73 74 6f 72 65 5f 68 69 73 74 6f 72 79 22 3a 66 61 6c 73 65 2c 22 75 73 65 72 5f 65 78 70 72 65 73 ... 12329 more bytes>
] Error: Socket is closed
at a.postToSocket (/Users//.vscode/extensions/ms-toolsai.jupyter-2024.4.0-darwin-arm64/dist/extension.node.js:318:10349)
at /Users/
/.vscode/extensions/ms-toolsai.jupyter-2024.4.0-darwin-arm64/dist/extension.node.js:318:10099 {
errno: 9,
code: 'EBADF'
}
11:18:14.974 [error] Failed to write data to the kernel channel shell [
<Buffer 3c 49 44 53 7c 4d 53 47 3e>,
<Buffer 65 36 62 39 62 33 61 30 35 35 64 64 33 37 35 34 62 65 32 35 37 34 37 35 32 33 64 32 63 31 35 64 36 33 66 62 61 65 30 32 38 32 63 61 33 35 36 36 31 37 ... 14 more bytes>,
<Buffer 7b 22 64 61 74 65 22 3a 22 32 30 32 34 2d 30 35 2d 30 37 54 31 38 3a 31 38 3a 31 34 2e 39 37 34 5a 22 2c 22 6d 73 67 5f 69 64 22 3a 22 64 62 31 63 37 ... 177 more bytes>,
<Buffer 7b 7d>,
<Buffer 7b 7d>,
<Buffer 7b 22 73 69 6c 65 6e 74 22 3a 66 61 6c 73 65 2c 22 73 74 6f 72 65 5f 68 69 73 74 6f 72 79 22 3a 66 61 6c 73 65 2c 22 75 73 65 72 5f 65 78 70 72 65 73 ... 12329 more bytes>
] Error: Socket is closed
at a.postToSocket (/Users//.vscode/extensions/ms-toolsai.jupyter-2024.4.0-darwin-arm64/dist/extension.node.js:318:10349)
at /Users/
/.vscode/extensions/ms-toolsai.jupyter-2024.4.0-darwin-arm64/dist/extension.node.js:318:10099 {
errno: 9,
code: 'EBADF'
}

Screenshots
image

Computer used:

  • OS: MacOS
  • M3 chip

Additional context
I've been trying to use the cellfinder APIs too. The detected cells output is always empty - used the training data images used in the paper, from here: https://gin.g-node.org/cellfinder/manuscript_data

@priya-velu5 priya-velu5 added the bug Something isn't working label May 7, 2024
@adamltyson
Copy link
Member

Hi @priya-velu5, could you attach the specific code you're running here?

Also, do you see the same behaviour outside of VSCode?

@priya-velu5
Copy link
Author

I see the same behaviour when running cell detection on the napari plugin too. This is the Screenshot of the napari parameters:

image

I got the pretrained model weights from here: https://gin.g-node.org/cellfinder/manuscript_data

This is the code that crashed:

import napari

from cellfinder.napari.sample_data import load_sample

viewer = napari.Viewer()
# Open plugin
viewer.window.add_plugin_dock_widget(
    plugin_name="cellfinder", widget_name="Cell detection"
)
# Add sample data layers
for layer in load_sample():
    viewer.add_layer(napari.layers.Image(layer[0], **layer[1]))


if __name__ == "__main__":
    # The napari event loop needs to be run under here to allow the window
    # to be spawned from a Python script
    napari.run()

@alessandrofelder
Copy link
Member

alessandrofelder commented May 9, 2024

Could you

  • post the error message/Python traceback you get when it crashes
  • describe what you do in napari? Presumably you hit the "Run" button?

please?

(I assume you installed brainglobe and napari as in your first post, on the same machine)

I just tried to reproduce the code above in a fresh conda environment with just pip install brainglobe on my M2 Macbook. I hit run and was able to find some cells:
image

@alessandrofelder
Copy link
Member

I got the pretrained model weights from here: https://gin.g-node.org/cellfinder/manuscript_data

(btw I think the "Use pre trained weights" checkbox will override what you point to in the "trained model" textbox, and download the pretrained weights for you - which are the same ones you seem to have downloaded manually)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants