modify an attribute of the dataset associated with the train_dataloader of the datamodule #14680
Unanswered
malfonsoarquimea
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
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.
-
Hi! I am working on a project where I need to change an attribute of the dataset that is loaded into the train_dataloader in the datamodule that I pass to the train.fit()

What I am actually trying is something like this in the on_train_epoch_start(self)
self.trainer.datamodule.train_dataloader().dataset.attribute=5
but it doesn't change and it remains unchanged
What am I doing wrong?
thanks!
Beta Was this translation helpful? Give feedback.
All reactions