Skip to content
Discussion options

You must be logged in to vote

Hi @fogunsan, I just get your points, I don't think we can pass a dataset to CacheDataset since CacheDataset can only cache non-random transforms. And also most of the random transforms are non-thread safe.

MONAI/monai/data/dataset.py

Lines 735 to 740 in 98b6a15

Note:
`CacheDataset` executes non-random transforms and prepares cache content in the main process before
the first epoch, then all the subprocesses of DataLoader will read the same cache content in the main process
during training. it may take a long time to prepare cache content according to the size of expected cache data.
So to debug or verify the program before real training, users can set…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@fogunsan
Comment options

@KumoLiu
Comment options

@fogunsan
Comment options

@KumoLiu
Comment options

Answer selected by fogunsan
@fogunsan
Comment options

@KumoLiu
Comment options

@fogunsan
Comment options

@KumoLiu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants