Problem with multiprocessing context
See original GitHub issueI am currently experiencing the following issue when running sockeye-train:
[INFO:sockeye.training] Training started.
[INFO:sockeye.utils] Releasing GPU 0.
[ERROR:root] Uncaught exception
Traceback (most recent call last):
File "/usr/local/bin/sockeye-train", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/sockeye/train.py", line 825, in main
train(args)
File "/usr/local/lib/python3.6/dist-packages/sockeye/train.py", line 955, in train
existing_parameters=args.params)
File "/usr/local/lib/python3.6/dist-packages/sockeye/training.py", line 627, in fit
process_manager = DecoderProcessManager(self.model.output_dir, decoder=decoder)
File "/usr/local/lib/python3.6/dist-packages/sockeye/training.py", line 1282, in __init__
self.ctx = mp_utils.get_context() # type: ignore
File "/usr/local/lib/python3.6/dist-packages/sockeye/multiprocessing_utils.py", line 71, in get_context
assert __context is not None, ("Multiprocessing context not initialized. Please call "
AssertionError: Multiprocessing context not initialized. Please call sockeye.multiprocessing_utils.initialize() right after interpreter startup.
Any idea what could be causing this?
I am running sockeye using mxnet-cu100mkl inside a singularity container.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Multiprocessing Context in Python
Multiprocessing contexts provide a more flexible way to manage process start methods directly within a program, and may be a preferred approach ...
Read more >Python multiprocessing isn't working any more, even the ...
I got the error AttributeError: module 'multiprocessing.util' has no attribute '_args_from_interpreter_flags' when running a program of mine ...
Read more >Default multiprocessing context is broken and should never be ...
The default multiprocessing context (on POSIX systems) is fork-without-exec. As a result, all process state is mirrored in the subprocesses, ...
Read more >multiprocessing — Process-based parallelism — Python 3.11 ...
Context objects have the same API as the multiprocessing module, and allow one ... It is an error to attempt to join a...
Read more >Why your multiprocessing Pool is stuck (it's full of sharks!)
On Linux, the default configuration of Python's multiprocessing library can lead to deadlocks and brokenness. Learn why, and how to fix it.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think this is the case. If you look at
setup.pyit points directly tosockeye.train:main.Since the multiprocessing init method checks if it’s already been called, could you simply remove the
ifcondition?#704 was merged.