Skip to content

2220 Decollate batch into list after iteration computation (29/June)#2315

Merged
wyli merged 53 commits intodevfrom
feature/2220-decollate
Jun 29, 2021
Merged

2220 Decollate batch into list after iteration computation (29/June)#2315
wyli merged 53 commits intodevfrom
feature/2220-decollate

Conversation

@Nic-Ma
Copy link
Copy Markdown
Contributor

@Nic-Ma Nic-Ma commented Jun 6, 2021

Fixes #2220 #2300 #2275 #2410 #2452 .

Description

This PR added support to decollate the iteration output.
The main idea is to decollate the output dict / list of an iteration into a list of dicts / lists, copy the scalar values(like loss) into every dict / list. then all the following logic are based on this list of dicts / lists.

Status

Ready

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.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Nic-Ma and others added 2 commits June 6, 2021 08:35
…2244)

* [DLMED] add support for Activation transform

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] change all the array level post transforms to channel-first

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] update all the IO, utility, post transforms

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] update engines for list of dict

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] update all the event handlers

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] support non-batch data

Signed-off-by: Nic Ma <[email protected]>

* [MONAI] python code formatting

Signed-off-by: monai-bot <[email protected]>

* [DLMED] update according to comments

Signed-off-by: Nic Ma <[email protected]>

* [DLMED] update based on the latest APIs

Signed-off-by: Nic Ma <[email protected]>

Co-authored-by: monai-bot <[email protected]>
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 11, 2021

/black

@Nic-Ma Nic-Ma force-pushed the feature/2220-decollate branch from 6889e1c to b86b921 Compare June 15, 2021 15:47
@Nic-Ma Nic-Ma force-pushed the feature/2220-decollate branch from b86b921 to fb3ce3e Compare June 15, 2021 16:02
@Nic-Ma Nic-Ma changed the title [WIP] 2220 Decollate batch into list of tensors after model forward 2220 Decollate batch into list of tensors after model forward Jun 15, 2021
@Nic-Ma Nic-Ma marked this pull request as ready for review June 15, 2021 16:03
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 15, 2021

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 15, 2021

/integration-test

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 16, 2021

/black

@Nic-Ma Nic-Ma changed the title 2220 Decollate batch into list of tensors after model forward [WIP] 2220 Decollate batch into list of tensors after model forward Jun 16, 2021
@Nic-Ma Nic-Ma removed request for ericspod and wyli June 16, 2021 09:36
@Nic-Ma Nic-Ma requested a review from wyli June 24, 2021 23:27
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 25, 2021

Mark: when PR #2451 merged, I will update the integration test in this PR that computes a list tensors in ignite metrics.

Thanks.

Copy link
Copy Markdown
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

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

thanks, please see some comments inline

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 28, 2021

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 28, 2021

Hi @wyli ,

I updated the integration test to use ignite v0.4.5 metrics, hopefully, it will work when the ignite 0.4.5 PR merged.
So I canceled the CI tests now, let's test later.

Thanks.

@wyli
Copy link
Copy Markdown
Contributor

wyli commented Jun 28, 2021

Hi @wyli ,

I updated the integration test to use ignite v0.4.5 metrics, hopefully, it will work when the ignite 0.4.5 PR merged.
So I canceled the CI tests now, let's test later.

Thanks.

sure, I'll run all the nightly tests on this branch before merging

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 28, 2021

Thanks, let me fix all the merge conflicts.

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 28, 2021

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented Jun 29, 2021

Hi @wyli ,

Thanks for your quick fix in CI config, added the issue to this PR description.

Copy link
Copy Markdown
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

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

thanks! I did my best to review this PR, and all the CI pipelines seem to be happy with it.

@wyli wyli merged commit 2085a49 into dev Jun 29, 2021
@wyli wyli deleted the feature/2220-decollate branch June 29, 2021 13:43
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.

Transforms need to handle list of channel-first data

3 participants