-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide ability to override map_items=True
set by default for Dataset
#7646
Labels
Comments
I'm happy to send a PR for this! |
7 tasks
Hi @KumoLiu I've made a PR for this change. Let me know if all good. Thanks! |
surajpaib
added a commit
to surajpaib/MONAI
that referenced
this issue
May 23, 2024
KumoLiu
added a commit
to surajpaib/MONAI
that referenced
this issue
May 30, 2024
KumoLiu
added a commit
to surajpaib/MONAI
that referenced
this issue
May 31, 2024
KumoLiu
added a commit
that referenced
this issue
May 31, 2024
Fixes #7646 ### Description A few sentences describing the changes proposed in this pull request. ### 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). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Suraj Pai <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: YunLiu <[email protected]> Co-authored-by: Ben Murray <[email protected]>
slicepaste
pushed a commit
to slicepaste/MONAI
that referenced
this issue
Jun 3, 2024
Fixes Project-MONAI#7646 ### Description A few sentences describing the changes proposed in this pull request. ### 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). - [x] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. --------- Signed-off-by: Suraj Pai <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: YunLiu <[email protected]> Co-authored-by: Ben Murray <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
MONAI/monai/data/dataset.py
Line 98 in bff4b15
In the
Dataset
class, for anytransform
applied,map_items=True
is the default behavior in theapply_transform
helper function.I'm trying to use some other datasets in MONAI which have an (input, target) tuple as the return from
_getitem_
. When I superclass this with the MONAI dataset, the tuple is unpacked, and the input and target are operated on as different items in the dataset.Describe the solution you'd like
Ability to provide
kwargs
toDataset
that propagates to theapply_transform
function, allowing disabling this mapping behavior.Describe alternatives you've considered
Not using the Dataset class.
Additional context
A lot of datasets have the (input, target) behavior, and it would be useful to be able to wrap these in MONAI dataset classes.
The text was updated successfully, but these errors were encountered: