561 497 Provide metrics base APIs#2291
Merged
Nic-Ma merged 32 commits intoJun 6, 2021
Merged
Conversation
merge master
merge master
merge master
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Contributor
Author
|
/black |
Signed-off-by: monai-bot <monai.miccai2019@gmail.com>
Contributor
Author
|
Hi @vfdev-5 , This PR added the metric base class and support a list of tensors. Tried to align with your new metric API design. Thanks. |
vfdev-5
reviewed
Jun 2, 2021
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Contributor
Author
|
/black |
Signed-off-by: Nic Ma <nma@nvidia.com>
9f3945f to
1372133
Compare
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Contributor
Author
|
/black |
Contributor
Author
|
/integration-test |
Contributor
Author
Signed-off-by: Nic Ma <nma@nvidia.com>
Contributor
Author
|
/black |
yiheng-wang-nv
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the changes, I left some comments above.
wyli
reviewed
Jun 3, 2021
wyli
left a comment
Contributor
There was a problem hiding this comment.
thanks, I put some initial comments, the metric base classes may need more work, let me check the evaluation working group discussions and think about this
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Contributor
Author
|
/black |
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
Contributor
Author
|
/black |
Contributor
Author
|
As this is a very big feature update, I created a new branch: feature/561-metrics-api in the Project-MONAI repo. Thanks. |
Nic-Ma
added a commit
that referenced
this pull request
Jun 11, 2021
* 561 497 Provide metrics base APIs (#2291) * [DLMED] add metric base class Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update meandice and auc Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] extract reduce API Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update regression metrics Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update all the other metrics and enhance unit tests Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add doc-strings and update unit tests Signed-off-by: Nic Ma <nma@nvidia.com> * [MONAI] python code formatting Signed-off-by: monai-bot <monai.miccai2019@gmail.com> * [DLMED] fix flake8 issue Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix pytype issue Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix all the mypy issues Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix integration test Signed-off-by: Nic Ma <nma@nvidia.com> * [MONAI] python code formatting Signed-off-by: monai-bot <monai.miccai2019@gmail.com> * [DLMED] fix flake8 issue Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix pytype issue Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add more sanity check Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to Yiheng's comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to Wenqi's comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] change to "_compute()" and "aggregate()" Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add compute_list() Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix flake8 issue Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] fix flake8 issue Signed-off-by: Nic Ma <nma@nvidia.com> Co-authored-by: monai-bot <monai.miccai2019@gmail.com> Co-authored-by: Yiheng Wang <68361391+yiheng-wang-nv@users.noreply.github.com> * [DLMED] update according to comments 1. re-define base classes in 3 levels to make it more clear and flexible to extend 2. added self-contained variables in metrics to provide easier API 3. added reset() and sync() logic 4. added distributed data parallel logic for all the metrics Signed-off-by: Nic Ma <nma@nvidia.com> * [MONAI] python code formatting Signed-off-by: monai-bot <monai.miccai2019@gmail.com> * [DLMED] fix flake8 issue Signed-off-by: Nic Ma <nma@nvidia.com> * [MONAI] python code formatting Signed-off-by: monai-bot <monai.miccai2019@gmail.com> * [DLMED] optimize base classes Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] simplify integration tests to use new APIs Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update based on comments Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] add synced=False in add() Signed-off-by: Nic Ma <nma@nvidia.com> * [DLMED] update according to comments Signed-off-by: Nic Ma <nma@nvidia.com> * full ci/cd for feature branches Signed-off-by: Wenqi Li <wenqil@nvidia.com> * [DLMED] update aggregate() Signed-off-by: Nic Ma <nma@nvidia.com> Co-authored-by: monai-bot <monai.miccai2019@gmail.com> Co-authored-by: Yiheng Wang <68361391+yiheng-wang-nv@users.noreply.github.com> Co-authored-by: Wenqi Li <wenqil@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR added base class for the metrics.
And add support for
list of channel-first Tensor.It's a non-breaking change.
Status
Ready
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests.make htmlcommand in thedocs/folder.