Skip to content

Default prepare batch update#5079

Merged
Nic-Ma merged 8 commits intoProject-MONAI:devfrom
ericspod:default_prepare_batch-update
Sep 5, 2022
Merged

Default prepare batch update#5079
Nic-Ma merged 8 commits intoProject-MONAI:devfrom
ericspod:default_prepare_batch-update

Conversation

@ericspod
Copy link
Copy Markdown
Member

@ericspod ericspod commented Sep 2, 2022

Description

This allows default_prepare_batch to handle batches containing a single tensor or a pair of tensors. Normally if one uses array transforms you'll get an error saying the default batch function needs dictionaries so this will allow such transform sequences to be used without modification.

Status

Work in progress

Types of changes

  • 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.

@ericspod ericspod marked this pull request as ready for review September 4, 2022 16:56
@ericspod ericspod requested review from Nic-Ma and wyli September 4, 2022 16:56
Copy link
Copy Markdown
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wyli
Copy link
Copy Markdown
Contributor

wyli commented Sep 5, 2022

/build

@wyli wyli enabled auto-merge (squash) September 5, 2022 09:55
@wyli wyli disabled auto-merge September 5, 2022 09:58
Signed-off-by: Eric Kerfoot <[email protected]>
@ericspod
Copy link
Copy Markdown
Member Author

ericspod commented Sep 5, 2022

/black

@ericspod
Copy link
Copy Markdown
Member Author

ericspod commented Sep 5, 2022

I updated the classes with more explanatory commentary and correct type annotations if you could please review again @Nic-Ma, thanks.

@ericspod ericspod requested a review from Nic-Ma September 5, 2022 12:45
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Sep 5, 2022

/build

@Nic-Ma Nic-Ma merged commit 2ed44aa into Project-MONAI:dev Sep 5, 2022
@ericspod ericspod deleted the default_prepare_batch-update branch September 5, 2022 15:31
wyli added a commit to yashika-git/MONAI that referenced this pull request Sep 6, 2022
### Description
This allows `default_prepare_batch` to handle batches containing a single tensor or a pair of tensors. Normally if one uses array transforms you'll get an error saying the default batch function needs dictionaries so this will allow such transform sequences to be used without modification.

### Status
**Work in progress**

### 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`.
- [ ] 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: Eric Kerfoot <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants