rename n_classes to num_classes#2842
Conversation
e04f434 to
62ad273
Compare
|
This is obviously a breaking change, but definitely a useful one. Similarly, we use We also have a couple of different ways of specifying image size if that's necessary, but it's probably more effort than it's worth to correct that. |
|
this PR is probably needed, it is also a good opportunity to test and roll out the MONAI/monai/utils/deprecated.py Lines 109 to 119 in 1ffa909 n_class user could get a specific error message @Nic-Ma
|
Nic-Ma
left a comment
There was a problem hiding this comment.
Looks good to me.
Please note to execute the integration tests and update related tutorials.
Thanks.
is I am new in this repository, due to GH policy I need to have approved each CI run by maintainers
what steps do you suggest, as this is a breaking change, shall this be merged first and update tutorials or do it in parallel? |
|
/integration-test |
|
I already triggered the integration tests by command, CC @wyli . Thanks. |
@rijobro I would address in it separate PR :]
@wyli prepared PR here: Project-MONAI/tutorials#322
@Nic-Ma I have been using this zero dependence feature: https://pypi.org/project/pyDeprecate/ |
|
this will break the current pretrained model loading... (the following works for the dev branch) import os
from monai.apps.mmars import MODEL_DESC
from monai.apps.mmars import load_from_mmar
# download the MMAR from NGC to local "./" folder
for x in MODEL_DESC:
pretrained_model = load_from_mmar(item=x, mmar_dir="./", map_location="cpu")mainly for the breaking changes in:
could you please help make the above two files backward compatible for now? |
@wyli Are you fine with using https://pypi.org/project/pyDeprecate |
Monai aims at keeping the set of dependencies small for its core modules https://github.com/Project-MONAI/MONAI/blob/dev/requirements.txt we should consider |
|
The deprecated annotations won't be optional so I don't think we can do an optional dependency for pyDeprecate. The idea was to define our own decorator that was just enough for our purposes without being a huge amount of code. pyDeprecate is providing a similar facility but having minimal dependencies is worth the reduplication of code in this instance. |
bebf604 to
cb8d93a
Compare
|
@ericspod I have added back-compatibility path, mind check if I use the |
|
/integration-test |
@Nic-Ma it seems that |
|
The /integration-test is done here https://github.com/Project-MONAI/MONAI/actions/runs/1169956359 I think there are some issue with the utility function. How about we remove the decorator deprecated_arg for now and merge this PR, then have a follow-up on fixing deprecated_arg? |
|
just a noob question why Flake8 CI is complaining about Isort formating? so I just just |
f951fd4 to
6f97f4b
Compare
|
/build |
|
looks like the pre-commit ci doesn't read the black config Lines 13 to 17 in ce139f6 |
da77414 to
fd7d40f
Compare
|
/build |
fd7d40f to
f7bf296
Compare
|
any suggestion on this typing issue: while I have not touched any return types... could be related to using the |
you're right, I think the wrapper needs some enhancements, do you have time to look into |
|
The decorator might have an issue with it's type or an issue with constructors but it's being used correct I believe. |
Signed-off-by: Jirka <[email protected]>
Signed-off-by: Jirka <[email protected]>
Signed-off-by: Jirka <[email protected]>
f7bf296 to
0f806d3
Compare
* Implement SplitOnGrid Signed-off-by: Behrooz <[email protected]> * Implement dictionary-based SplitOnGrid Signed-off-by: Behrooz <[email protected]> * Update inits Signed-off-by: Behrooz <[email protected]> * Update docs Signed-off-by: Behrooz <[email protected]> * Change imports Signed-off-by: Behrooz <[email protected]> * Update input logic in SplitOnGrid) Signed-off-by: Behrooz <[email protected]> * Add unittests for SplitOnGrid and SplitOnGridDict Signed-off-by: Behrooz <[email protected]> * Sort import Signed-off-by: Behrooz <[email protected]> * Remove imports Signed-off-by: Behrooz <[email protected]> * Address comments Signed-off-by: Behrooz <[email protected]> * Remove optional Signed-off-by: Behrooz <[email protected]> * Address thread safety issues Signed-off-by: Behrooz <[email protected]>
…roject-MONAI#2900) * [DLMED] fix type issue Signed-off-by: Nic Ma <[email protected]> * [DLMED] fix test Signed-off-by: Nic Ma <[email protected]> * [DLMED] simplify the change Signed-off-by: Nic Ma <[email protected]> * [DLMED] fix flake8 Signed-off-by: Nic Ma <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
d8477a6 to
76f490d
Compare
Signed-off-by: Wenqi Li <[email protected]>

Fixes #2841
Description
unify
n_classesandnum_classesacross model argumentsStatus
Ready/Work in progress/Hold
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests.make htmlcommand in thedocs/folder.