beats-like-a-helix
04/11/2022, 8:57 PMmultiprocessing
gives me this complaint while being used within Kedro:
from pycbc.waveform import get_fd_waveform
File "/Users/jordan/mambaforge/envs/gravitational_waves/lib/python3.8/site-packages/pycbc/__init__.py", line 150, in <module>
multiprocessing.set_start_method('fork')
File "/Users/jordan/mambaforge/envs/gravitational_waves/lib/python3.8/multiprocessing/context.py", line 243, in set_start_method
raise RuntimeError('context has already been set')
RuntimeError: context has already been set
Does anyone have an idea how I can fix this? Cheers.datajoely
04/12/2022, 4:02 PMbeats-like-a-helix
04/12/2022, 4:16 PMavan-sh
04/13/2022, 9:52 AMmultiprocessing.set_start_method('fork')
. Due to this, any possible of multiprocessing context that might be set before importing pycbc is likely to create similar error.
Possibly pycbc kill/remove any context before trying to create a new one as it is always possible that other imports that precede could set a context already. (Not sure if this removing context is correct or even correct)
In this case kedro is not using any multiprocessing functions, but has an import of multiprocessing which is somehow creating a context.
A quick fix to unblock your development is to importing pycbc in your bin/kedro before any kedro import.
Another option that works is to comment out the ShelveStore code in your kedro.framework.session.store
module in your local installation.
Sadly, both are temporary fixes, I don't have anything permanentbeats-like-a-helix
04/13/2022, 5:48 PM-a
flag to kedro viz
or the same error will occur, but this is a small price to pay.datajoely
04/13/2022, 5:49 PMbeats-like-a-helix
04/13/2022, 5:50 PMavan-sh
04/14/2022, 2:27 AMdatajoely
04/14/2022, 4:16 AMavan-sh
04/14/2022, 5:40 PM