This minimal example:
dataset = TensorDataset(torch.randn(20,15, 100), torch.randn(20,15, 1))

def test_mp(dataset):
    print("hello")
    
import torch.multiprocessing as mp
mp.set_start_method("spawn", force=True)

queue = mp.Queue()
q_processes = []

q_processes.append(mp.Process(target=test_mp, args=(dataset)))

q_processes[0].start()
q_processes[0].join()

Gives me the error:
ValueError: bad value(s) in fds_to_keep
How can I correctly pass this dataset to mp.Process ? I use spawn because of CUDA.
torch: 1.9.1
CUDA: 11.1 - GeForce GTX 1080 Ti
python 3.9.9

Thanks a lot in advance!