Modifying the running dataset of the dataloader with a callback #16779
Unanswered
ysig
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'm modifying a pytorch lightning (1.4.2) code that uses
trainer.fit(data, module)
.I'm trying to apply a curriculum so that at
batch_end
, through a callback, every X amount of global steps I modify the dataset, which amounts in changing an attribute of the dataset:trainer.datamodule.train_dataloader().dataset.phase = phase #phase = 1
trainer.datamodule.datasets['train'].phase = phase
but it turns out that in both ways the attribute modifications doesn't pass, which is probably because a shallow copy of the dataset is created. Do you know how I can access the actual dataset that is being running or how I can achieve the same goal in a different way?
Beta Was this translation helpful? Give feedback.
All reactions