How to properly load and save data module #13151
Unanswered
mfoglio
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 1 comment
-
@mfoglio Why not simply fixing the seed? from pytorch_lightning import seed_everything
seed_everything(42) |
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.
-
I am using checkpointing with the goal of stopping and resuming the training later on. One my main concern, is making sure that the train / val / test split remains the same. I am using a
ModelCheckpoint
to save the status of the training process. However, after opening a.ckpt
file usingtorch.load
I noticed that there is nothing related to the status of myDataModule
.Here is my data module:
What would be the best way to load and save the data module? Every time I create them the train, val, and test datasets could contain different records. The records are saved as a list of index
List[int]
asdataset.annotation_ids
. Therefore, I need to store this information to resume training. Is there a way to include this in theModelCheckpoint
?Beta Was this translation helpful? Give feedback.
All reactions