Skip to content

smartcache should fallback to regular cachedataset when cache_num is large #1539

@wyli

Description

@wyli

smartcache raises a value error when a large cache_num is provided:

MONAI/monai/data/dataset.py

Lines 603 to 604 in 97ff1e0

if self.cache_num >= len(data):
raise ValueError("cache_num must be smaller than dataset length to support replacement.")

in this case itd be great to change this to a warning and continue working as a regular CacheDataset

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions