The default value of dataloader multiprocessing_context
seems to be “spawn” in a spawned process on Unix. I will get OOM unless I set multiprocessing_context="fork"
explicitly.
It doesn’t behave as documentation says:
On Unix,
fork()
is the defaultmultiprocessing
start method. Usingfork()
, child workers typically can access thedataset
and Python argument functions directly through the cloned address space.