How to use Randomizable third party transforms or customered transforms for CacheDataset? #2796
-
This jupyter shows how to insert third party transforms (from I noted that The The It means that only the transforms which inherite However our customed transforms or the transforms from torchIO does not inherite For instance, this is my own customed transform to load data (I hope it could be cached):
If I use this transform as the first transform in my composed transform list, I found this transform will not be cached at all. So I think it is necessary to remind users in the documentation that "If you want your own transforms be cached by monai.CacheDataset/SmartCacheDataset/PersistentDataset, you have to ensure: 1. your transforms inherite monai.Transform 2. your transforms can not be Randomizable " Another solution is: changing this line: Is my understanding right? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @Jingnan-Jia , Thanks for your investigation and analysis & suggestions. Thanks. |
Beta Was this translation helpful? Give feedback.
Hi @Jingnan-Jia ,
Thanks for your investigation and analysis & suggestions.
I submitted PR to enhance the doc-string of cache datasets: #2799.
Thanks.