Since I have a large dataset (millions of cells) and want to include as many as possible genes (e.g. n_var_genes= 15000 in c2f.utils.get_training_data), I want to perform mod.train using multiple GPUs. Given the pytorch_lightening version (1.5.10post0) in cell2fate environment only supporting DDPPlugin, the training process is adapted to
mod.train(accelerator = "gpu", devices=-1, strategy=DDPPlugin(find_unused_parameters=True), lr=1e-04, batch_size=1024)
However, I encountered the error
RuntimeError: DistributedDataParallel is not needed when a module doesn't have any parameter that requires a gradient.
Changing find_unused_parameters=True to find_unused_parameters=False did not resolve the problem. But when I train the model using one GPU, like
mod.train(accelerator = "gpu", devices=1, lr=1e-04, batch_size=1024)
everything goes smoothly. Does cell2fate support training on multiple GPUs? If yes, how can I adapt the tutorial code? Thanks for your help.
Since I have a large dataset (millions of cells) and want to include as many as possible genes (e.g.
n_var_genes= 15000inc2f.utils.get_training_data), I want to performmod.trainusing multiple GPUs. Given the pytorch_lightening version (1.5.10post0) in cell2fate environment only supportingDDPPlugin, the training process is adapted toHowever, I encountered the error
Changing
find_unused_parameters=Truetofind_unused_parameters=Falsedid not resolve the problem. But when I train the model using one GPU, likeeverything goes smoothly. Does cell2fate support training on multiple GPUs? If yes, how can I adapt the tutorial code? Thanks for your help.