Lightning-AI / pytorch-lightning

Pretrain, finetune ANY AI model of ANY size on multiple GPUs, TPUs with zero code changes.
https://lightning.ai
Apache License 2.0
28.35k stars 3.39k forks source link

AttributeError: 'DistributedDataParallel' object has no attribute 'test_step' #14146

Closed esraashabrani closed 2 years ago

esraashabrani commented 2 years ago

🐛 Bug

I was trying the K-Fold cross validation example and got this error.

To Reproduce

Run this code as a python script https://github.com/Lightning-AI/lightning/blob/master/examples/pl_loops/kfold.py.

Expected behavior

Environment

Additional context

esraashabrani commented 2 years ago

Any updates please? @awaelchli

elifdaldal commented 2 years ago

I am having the same error. I'm running Python 3.9.13.