Hi @Konsthr,
There is no restriction where DDP is stated. Whether using DDP in a class or outside is not a problem.
You can refer to several examples including mine 1.
The following functions are related.
option.py - setup
model/__init__.py - parallelize
p.s. My implementation allows both DP and DDP.