Pytorch-lightning: Warn when you forget to call super().__init__() in datamodule subclass

Created on 26 Aug 2020  路  2Comments  路  Source: PyTorchLightning/pytorch-lightning

馃殌 Feature


If you forget to call super().__init__() in datamodule subclass, you end up getting confusing errors down the line. We should let the user know they've forgotten to do so and give them a warning.

Motivation

Pitch

Alternatives

Additional context

data / DataModule enhancement help wanted won't fix

Most helpful comment

Exact error message is: AttributeError: 'YourDataModule' object has no attribute '_has_prepared_data'. Adding this to make the error searchable here.

All 2 comments

Exact error message is: AttributeError: 'YourDataModule' object has no attribute '_has_prepared_data'. Adding this to make the error searchable here.

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, Pytorch Lightning Team!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anthonytec2 picture anthonytec2  路  3Comments

baeseongsu picture baeseongsu  路  3Comments

justusschock picture justusschock  路  3Comments

maxime-louis picture maxime-louis  路  3Comments

williamFalcon picture williamFalcon  路  3Comments