Closed mestmas closed 2 years ago
@DanielDondorp this seems windows specific, any ideas? Related to the way windows does forking?
Fastest solution is probably to just use threading if windows, multiprocessing if not windows.
I vaguely remember that you can make non-daemonic pools. Doing that to the top-level here would solve this I think. I can't look into it deeply right now but I will have a look tomorrow.
@kushalkolar What I had in mind yesterday will not work with python3.6 I see. Would have been nice to try changing out the Pool import with this:
from concurrent.futures import ProcessPoolExecutor as Pool
A work-around for earlier python versions might be detailed here but the implementation is a bit more involved.
Otherwise perhaps just using multiprocessing.pool.ThreadPool
in analysis/stimulus_extraction.py?
Hi guys, thanks for your help.
@DanielDondorp do you mean that I can try to substitute "from multiprocessing import Pool" with "from concurrent.futures import ProcessPoolExecutor as Pool" in stimulus_extraction.py?
Thanks again.
Hi! you could try replacing the import it with 'multiprocessing.pool.ThreadPool' since I don't think the other thing will work with anything under python 3.8
@kushalkolar will know if I actually found the correct import.
@mestmas what Python version are you using for mesmerize?
@kushalkolar I'm using 3.8 (thought was 3.6). I've try multiprocessing.pool.ThreadPool but I get the following error: import multiprocess.pool.ThreadPool as Pool ModuleNotFoundError: No module named 'multiprocess.pool.ThreadPool'; 'multiprocess.pool' is not a package" but the function is there. Later, since my python is 3.8, I try "from multiprocessing import Pool" and I got the following error : 'ProcessPoolExecutor' object has no attribute 'imap'
I suppose for the first fix it is a typo: 'multiprocess' instead of multiprocessing
@DanielDondorp no sorry, I made the typo when I wrote it here, in the script is properly written "import multiprocess.pool.ThreadPool as Pool"
Sorry, I am a bit confused now. It is supposed to be: import multiprocessing.pool.ThreadPool as Pool
. The error you get suggests that you wrote multiprocess
and not multiprocessing
in the file.
sorry, you are right, I try import multiprocessing.pool.ThreadPool as Pool and since it was giving me an error I try import multiprocess.pool.ThreadPool as Pool and Looks that I took the screenshot for the wrong one
Sorry, my bad. Can you try rewording the import as from multiprocessing.pool import ThreadPool as Pool
?
@DanielDondorp I changed it and it seems to work, I'll check the output tomorrow!! Thanks!!!
Good to hear!
Sorry, I'm a bit useless. I'm trying to use heat-map to visualize it. Is it correct? because I don't manage to see anything that makes sense for me. (thanks for your help)
What're you trying to visualize? The ExtractStims node is useful for plotting things like average traces in notebooks.
closing, you're welcome to re-open if you still have issues or post a new issue.
Hi all,
Describe the bug I'm trying to run "extractstim" from flowchart and I always get the program bolcked and the error: Daemonic processes are not allowed to have children.
To Reproduce Steps to reproduce the behavior, for example:![image](https://user-images.githubusercontent.com/92024598/136252052-50a55df6-5b7d-4af4-929d-58bae612f789.png)
Expected behavior Extract portions of curves according to stimulus mpas
Copy paste message from the error window (if any)![image](https://user-images.githubusercontent.com/92024598/136253395-e0a3fd17-75d3-4169-93ab-fa9ed9438b1f.png)
Operating System & specs (CPU, RAM etc.). Please complete the following information:
Details about your Mesmerize install using anaconda pip install 21.0.1
Additional context Add any other context about the problem here.
Thanks in advance!!