Configuration can be now used with multiprocessing:
import multiprocessing as mp
def worker_config_checker(config):
import numpy as np
assert "a" in config
assert config.a == 123
assert "b" in config
np.testing.assert_allclose(config.b, np.array([1, 2, 3]))
assert "out" in config
assert config.out == 12
if __name__ == "__main__":
config = ConfigObject(config_filepath)
ctx = mp.get_context("spawn")
p = ctx.Process(target=worker_config_checker, args=(config,))
p.start()
p.join()
Deep Learning DDP example with Ignite :