Skip to content

DataConnector.attach_datamodule doesn't respect LightningModule.datamodule anymore #8086

@yifuwang

Description

@yifuwang

🐛 Bug

#8002 changed attach_datamodule() so that it doesn't respect LIghtningModule.datamodule anymore. Unless this is intentional, we should bring back the old behavior.

https://github.com/PyTorchLightning/pytorch-lightning/pull/8002/files#diff-906ad7bb3bf022c44bada799c11c2b45ef0c12c3de2cc743d3078bd95cd0d778L117-L118

Please reproduce using the BoringModel

To Reproduce

Will provide along with a PR.

Expected behavior

DataConnector considers datamodule present when LightningModule.datamodule is set.

Environment

This should be environment agnostic.

Additional context

This broke some FB tests.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdata handlingGeneric data-related topichelp wantedOpen to be worked onwaiting on authorWaiting on user action, correction, or update

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions