AttributeError: Can't get attribute 'DataReader' on <module '__main__' (built-in)> #8898
Answered
by
talhaanwarch
talhaanwarch
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 2 comments 4 replies
-
You can disable that warning with the following import warnings
warnings.filterwarnings("ignore", message=".*does not have many workers which may be a bottleneck.*") |
Beta Was this translation helpful? Give feedback.
3 replies
-
do i need to write whole code under `if __name__ == "__main__"` or just
`trainer.fit(model)`
…On Mon, Aug 16, 2021 at 2:00 PM thomas chaton ***@***.***> wrote:
Did you try to add
if *name* == "*main*"
to your script ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#8898 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AI5FYO3X4RDTD7LMWYTWCBTT5DHTXANCNFSM5CEXIGTA>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
carmocca
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here is DataReader
when i do
it worked. but when I call it inside LightningModule, it throws an error
I am unable to figure out what is the error and how to resolve it.I tried to debug it, val_dataloader function is working, it print
ds 7
but validation_step is not working, it should print val step, but its not printing itEDIT
This issue is because of
numworker
, setting numworker to 0, resolve the issue, but I am getting this warningConsider increasing the value of the
num_workersargument
(try 12 which is the number of cpus on this machine)`Beta Was this translation helpful? Give feedback.
All reactions