I am not sure about the implementation of your ProcessData. But, based on the traceback and code, I suspect some objects in either cfg or process_data has some. problem with pickling by Python.
In the DataLoader, we pass dataset into worker_loop to fetch data.
  
      github.com
  
  
    pytorch/pytorch/blob/727c1d69d72b00acd7cf7aafd79923ae8caf550c/torch/utils/data/dataloader.py#L904-L918

w = multiprocessing_context.Process(
    target=_utils.worker._worker_loop,
    args=(self._dataset_kind, self._dataset, index_queue,
          self._worker_result_queue, self._workers_done_event,
          self._auto_collation, self._collate_fn, self._drop_last,
          self._base_seed, self._worker_init_fn, i, self._num_workers,
          self._persistent_workers))
w.daemon = True
# NB: Process.start() actually take some time as it needs to
#     start a process and pass the arguments over via a pipe.
#     Therefore, we only add a worker to self._workers list after
#     it started, so that we do not call .join() if program dies
#     before it starts, and __del__ tries to join but will get:
#     AssertionError: can only join a started process.
w.start()



  
  
    
    
  
  


Since the Error happens when kicking off worker, I suspect there are something within your process_data can not be pickled.
To verify the problem, can you try to pickle dump one process_data object and see whether there is a problem.