Pytorch model converted to 'DataParallel' object when `CUDA_VISIBLE_DEVICES` not set

Hi, I am using Catalyst for training my model. It works great if I explicitly set CUDA_VISIBLE_DEVICES, however if I did not set it, I would have following error:

ModuleAttributeError: 'DataParallel' object has no attribute '_loss'

Looks like that the model has been automatically converted to DataParallel object in Catalyst runner while the corresponding _loss method of my model was not assigned to it. Does anyone know if there is a way to either:

  1. correctly assign _loss method of the model to DataParallel object or
  2. disable conversion to DataParallel object in Catalyst runner?

Thank you!

CC @scitator as the dev of Catalyst :slight_smile: