Training from custom dataloaders / torch dataset #2261
Unanswered
luizfelippesr
asked this question in
Q&A
Replies: 3 comments 1 reply
-
This might be related to this #2254 |
Beta Was this translation helpful? Give feedback.
1 reply
-
Related: #2034 |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is quite unusual, and I'm not sure what would be causing this. Are you running out of RAM or GPU RAM? |
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
-
Anomalib works natively with customized lighting DataModule objects, with the possibility creating those from files on the local file system (the FolderDataset) . Is there a recommended way of using a bespoke torch dataset/dataloader instead?
I have a particular use-case where the part of the data can be stored on other devices and can be retrieved on-the-fly (and possibly cached) by an adaptor written as a torch dataset. Also, I often prefer pre-splitting my data into train/val/test and storing separately to avoid the possibility of later contamination (and also allowing things like extending only the training set with a few extra examples).
Since the training engine uses lightning, it should be possible to simply using
engine.fit(..., train_dataloaders=my_dataloader)
. However, this appears to give different results.For example, if I take the example run:
it finishes quickly in my system (using anomalib 1.1.0).
If modify in the following way (which should be equivalent):
I quickly run out of memory.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions