DataModule conditional dataloader not being able to recognize #8449
Unanswered
chris-tkinter
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
Hey @chris-tkinter, Lightning expects for you to return a DataLoader or Iterator. I recently implemented a MetaLearningDataset for distributed training: https://github.com/PyTorchLightning/pytorch-lightning/blob/master/tests/utilities/test_auto_restart.py#L354. I am working with the learn2learn team to provide better support for MetaLearning with Lightning. Mind giving it a try ? Best, |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hi, I have a datamodule that looks like this
However, I found that with
train_strategy == "meta_learning"
or not, it would not go through the functionload_dataloader
, in fact, in here it would make the variabledataloader
to be a python generator. As the result, the trainer somehow terminates directly without actual training.I am wondering is there anything I did wrong, and what would be the best way to make a conditional dataloader?
A little more context: I am trying to implement a meta learning approach, and would like to compare the meta learning approach with the vanilla / traditional approach, therefore I have a condition
train_strategy
here.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions