5390 Simplify cache content to only list type#5398
Conversation
merge master
merge master
merge master
merge master
merge master
merge master
merge master
Signed-off-by: Nic Ma <[email protected]>
|
/black |
|
/build |
|
@Nic-Ma , I do appreciate you putting time into creating this PR so quickly , but this does not address #5390 . That issue proposes to remove caching by key completely, since it is not necessary and there is no use cases to keep it. we should probably first agree if we're removing caching_by_key completely or not first. |
Signed-off-by: Nic Ma <[email protected]>
Signed-off-by: Nic Ma <[email protected]>
Signed-off-by: Nic Ma <[email protected]>
|
/black |
|
/build |
|
it looks better, and works good, I tested it. I'd still suggest explicitly providing data to _fill_cache() , instead of modifying self.data twice. It will be more explicit and more compact. you can use these functions below |
Signed-off-by: Nic Ma <[email protected]>
|
/black |
|
/build |
|
Hi @myron , Thanks for your suggestion. Thanks. |
This reverts commit 13801ee. Signed-off-by: Nic Ma <[email protected]>
e2a9277 to
7fcaa86
Compare
|
Hi @myron , During deep tests, I found that if the Thanks in advance. |
Thank you for the reply. So if data is a complicated iterable and p.imap does not handle its slicing, perhaps we can compute and list of non-repeated data indices and iterate on them. It seems like a more robust solution, and we don't need to a workaround to change self.data temporarily. Please see below. If this solution does not work for any reason , I'm okay with your PR as is. thank you |
|
/black |
Signed-off-by: Nic Ma <[email protected]>
dfa3bfa to
82f106f
Compare
|
/black |
e2e2294 to
aa162ef
Compare
|
Hi @myron , Thanks for your suggestion. Thanks in advance. |
Signed-off-by: Nic Ma <[email protected]>
|
/black |
|
/build |
Fixes #5390 . ### Description This PR simplified the `hash key` caching mode in the `CacheDataset` to use `list` as cache type, same as regular cache. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Nic Ma <[email protected]> Signed-off-by: monai-bot <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: monai-bot <[email protected]> Signed-off-by: KumoLiu <[email protected]>
Fixes Project-MONAI#5390 . ### Description This PR simplified the `hash key` caching mode in the `CacheDataset` to use `list` as cache type, same as regular cache. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Nic Ma <[email protected]> Signed-off-by: monai-bot <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: monai-bot <[email protected]> Signed-off-by: Yiheng Wang <[email protected]>
Fixes #5390 .
Description
This PR simplified the
hash keycaching mode in theCacheDatasetto uselistas cache type, same as regular cache.Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.