Thank you for your answer.
Strangely enough I am using the version 1.5.1 and the line returning self is present in the train() function. I even tried to reinstall 1.5.1 after cleaning conda cache. Then I created a a new conda environment and installed pytorch with python 3.8 (as I originally was using 3.7). However, the problem was still there.
The only thing I did not try was to insall the nightly-builds, as I could not download it within 7 minutes and lost patience. 
However, if the intended way of switching is not different from the non DistributedDataParallel case then I am glad. I was just starting out with DistributedDataParallel and was not sure whether its possible to switch modes, or one has to define the mode before using the wrapper or some other magic.