Merged
Conversation
* add dummy filter Signed-off-by: Holger Roth <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * adds docstring Signed-off-by: Wenqi Li <[email protected]> * rename filter example Signed-off-by: Holger Roth <[email protected]> * add license header Signed-off-by: Holger Roth <[email protected]> Signed-off-by: Holger Roth <[email protected]>
* fixes 4907 Signed-off-by: Wenqi Li <[email protected]> * fixes flake8 Signed-off-by: Wenqi Li <[email protected]> * fixes test cases Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Wenqi Li <[email protected]>
* [DLMED] enhance stats Signed-off-by: Nic Ma <[email protected]> * [DLMED] add tests Signed-off-by: Nic Ma <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [DLMED] fix tests Signed-off-by: Nic Ma <[email protected]> * [DLMED] update according to comments Signed-off-by: Nic Ma <[email protected]> * [DLMED] correct code folder Signed-off-by: Nic Ma <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [DLMED] keep backward compatible Signed-off-by: Nic Ma <[email protected]> * [DLMED] update according to comments Signed-off-by: Nic Ma <[email protected]> Signed-off-by: Nic Ma <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Update swin_unetr.py fixed potential issue with discrepant data types Signed-off-by: Bardia Khosravi <[email protected]> Signed-off-by: Bardia Khosravi <[email protected]>
* video dataset Signed-off-by: Richard Brown <[email protected]>
* Replace range(len(...)) with enumerate(...)
* add a mean iou handler and the unitest. Signed-off-by: binliu <[email protected]> * add MeanIoUHandler to documentation Signed-off-by: binliu <[email protected]> * add test_handler_mean_iou to min_tests.py Signed-off-by: binliu <[email protected]> * change the metric name in unitest of iou from dice to iou. Signed-off-by: binliu <[email protected]> Signed-off-by: binliu <[email protected]>
* fixes #4920 Signed-off-by: Wenqi Li <[email protected]> * workaround #4917 Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Wenqi Li <[email protected]>
* Improve FL ExchangeObject printing and summary Signed-off-by: Holger Roth <[email protected]> * add type annotation Signed-off-by: Holger Roth <[email protected]> * testing summary string Signed-off-by: Wenqi Li <[email protected]> * typing Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Holger Roth <[email protected]>
* provide init channel dim Signed-off-by: Wenqi Li <[email protected]> * update docstring Signed-off-by: Wenqi Li <[email protected]> * provide a default for get Signed-off-by: Wenqi Li <[email protected]> * update based on comments Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Wenqi Li <[email protected]>
* Improve data type conversion performance Signed-off-by: Gigon Bae <[email protected]> * Update monai/utils/type_conversion.py Co-authored-by: Gregory Lee <[email protected]> Signed-off-by: Gigon Bae <[email protected]> Co-authored-by: Gregory Lee <[email protected]> Co-authored-by: Behrooz Hashemian <[email protected]>
enhance subprocess tests Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Wenqi Li <[email protected]>
* optional grid for base class api consistency Signed-off-by: Wenqi Li <[email protected]> * update docs Signed-off-by: Wenqi Li <[email protected]> * update docs Signed-off-by: Wenqi Li <[email protected]> * docs update Signed-off-by: Wenqi Li <[email protected]> * initial pytorch tests Signed-off-by: Wenqi Li <[email protected]> * update tests Signed-off-by: Wenqi Li <[email protected]> * update min tests Signed-off-by: Wenqi Li <[email protected]> * fixes tests Signed-off-by: Wenqi Li <[email protected]> * update dtype Signed-off-by: Wenqi Li <[email protected]> * tested compiled prefer numpy backend for integer interp mode Signed-off-by: Wenqi Li <[email protected]> * extend type annotations Signed-off-by: Wenqi Li <[email protected]> * update based on comments Signed-off-by: Wenqi Li <[email protected]> * fixes a typo Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Wenqi Li <[email protected]>
* Adding __str__ to MetaTensor Signed-off-by: Eric Kerfoot <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Adding docstrings Signed-off-by: Eric Kerfoot <[email protected]> * Smooth field meshgrid fix Signed-off-by: Eric Kerfoot <[email protected]> Signed-off-by: Eric Kerfoot <[email protected]>
* fixes spatial resample Signed-off-by: Wenqi Li <[email protected]> * fixes #4938 Signed-off-by: Wenqi Li <[email protected]> * skip if no scipy Signed-off-by: Wenqi Li <[email protected]> * skip if no cupy Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Wenqi Li <[email protected]>
* Add num_worker for cucim read region Signed-off-by: Behrooz <[email protected]> * Add unittest for multithread cucim Signed-off-by: Behrooz <[email protected]> * Update docstring Signed-off-by: Behrooz <[email protected]>
* Minor fix for workflows Signed-off-by: Eric Kerfoot <[email protected]> * Minor fix for workflows Signed-off-by: Eric Kerfoot <[email protected]> * Minor fix for workflows Signed-off-by: Eric Kerfoot <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Signed-off-by: Eric Kerfoot <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
monai env vars
* adds new keyword Signed-off-by: Wenqi Li <[email protected]> * fixes #4962 Signed-off-by: Wenqi Li <[email protected]> * fixes #4964 Signed-off-by: Wenqi Li <[email protected]> * fixes tests Signed-off-by: Wenqi Li <[email protected]> * fixes typo Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Wenqi Li <[email protected]>
* Fix For RandSmoothDeform Component Order Signed-off-by: Eric Kerfoot <[email protected]> * Fix For RandSmoothDeform Component Order Signed-off-by: Eric Kerfoot <[email protected]> Signed-off-by: Eric Kerfoot <[email protected]>
…tches for 4975, 4979) (#4977) * fixes #4975 Signed-off-by: Wenqi Li <[email protected]> * fixes #4971 Signed-off-by: Wenqi Li <[email protected]> * fixes #4979 Signed-off-by: Wenqi Li <[email protected]> Signed-off-by: Wenqi Li <[email protected]>
…4986) Signed-off-by: Sachidanand Alle <[email protected]> Signed-off-by: Sachidanand Alle <[email protected]>
Two very minor changes to wording.
* enhance worker_init_fn Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Holger Roth <[email protected]>
Fixes #4993 ### Status **Ready** ### 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). - [ ] 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. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <[email protected]>
### Description This defines an abstract dense block class and a convolutional dense block using `Convolution` or `ResidualUnit` classes. A number of existing networks use dense blocks but have their own implementations that should be left as-is since these are reference implementations, but further definitions should use a common definition. I will have a network to submit as a bundle that uses this. ### Status **Ready** ### 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: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Fixes #5001. ### Description Raise error if no weights are converted. ### Status **Ready** ### 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). - [ ] 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. Signed-off-by: Holger Roth <[email protected]>
Fixes #4996 . ### Description This PR enhanced the `ConfigParser` to support nested new ID. ### 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). - [ ] 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. Signed-off-by: Nic Ma <[email protected]>
### Description Post transform to remove small objects. Merge Project-MONAI/DocImages#13 when happy. ### Status **Ready** ### 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). - [x] New tests added to cover the changes. Signed-off-by: Richard Brown <[email protected]>
Fixes #5553 ### Description Promote specified children of specified items to the level of item. ### 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). - [x] New tests added to cover the changes. - [x] 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. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Behrooz <[email protected]>
Fixes #5566 ### 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). Signed-off-by: Behrooz <[email protected]>
Signed-off-by: PedroFerreiradaCosta <[email protected]> Fixes #5417 . ### Description Makes SSIM loss depend on metric instead of the other way around (the loss was computing the metric). Returns contrastive sensitivity if the boolean `full` is True when calling `_compute_metric()` Adds unit test to `test_ssim_metric.py` to check if contrastive sensitivity output is working as expected. ### Types of changes - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [x] New tests added to cover the changes. - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [x] In-line docstrings updated. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: PedroFerreiradaCosta <[email protected]>
Part of #5517. ### Description When we have a list of transforms, we may want these transforms to do in random order. Add `RandomOrder` which is a subclass of `Compose` to provide the ability to apply a list of transformations in random order. ### 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. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: KumoLiu <[email protected]>
Part of #5385 . ### Description This PR added support to override the predefined configs in the experiment tracking settings. ### 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). - [ ] 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. Signed-off-by: Nic Ma <[email protected]>
simpler integration tests ### 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). - [ ] 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. Signed-off-by: Wenqi Li <[email protected]> Co-authored-by: Wenqi Li <[email protected]>
Fixes # . ### Description - Make the current nuclick transform tensor enabled. - Add option to use Gaussian Filter over user clicks. - Option to choose initial seed point based on distance transform instead of random - Optimize patch/boundary box creation logic for nuclei cells - The same transform should be useful to create an interactive nuclick classification model ### 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: Sachidanand Alle <[email protected]>
Signed-off-by: Ben Murray <[email protected]> ### Description This is part of the work towards #4855. It adds: - a lazy `apply` method - A transform-like wrapper for `apply` called `Apply` ~- `MetaMatrix` and related functionality to represent abstracted grid and matrix transforms with metadata~ - A universal `resample` function that can be used to apply grid / matrix transforms ~- Functional spatial and croppad implementations that define but don't apply transforms~ ### 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: Ben Murray <[email protected]> Signed-off-by: monai-bot <[email protected]> Signed-off-by: Wenqi Li <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: monai-bot <[email protected]> Co-authored-by: Wenqi Li <[email protected]> Co-authored-by: Wenqi Li <[email protected]>
closes #5588 closes #5589 Signed-off-by: monai-bot <[email protected]> Signed-off-by: monai-bot <[email protected]>
…ls (#5598) Signed-off-by: Sachidanand Alle <[email protected]> Fixes # . Throw error with description when there are no valid user click/signals ### Description Instead of torch.stack error, provide readable description when the signal is not valid, and no valid bounding boxes could be created based on user click points. 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). - [ ] 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. Signed-off-by: Sachidanand Alle <[email protected]>
Fixes #5333 . ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Dženan Zukić <[email protected]> Co-authored-by: Mingxin Zheng <[email protected]>
Making Algo base to have more generic inputs. Signed-off-by: myron <[email protected]>
Fixes #5596 Fixes #5088 ### Description simplify the conda env ### 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). - [ ] 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. Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]> Fixes #5611 ### Description skip the padding to make smaller memory footprint when the patch size is 0 or None for a particular dimension ### 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: Wenqi Li <[email protected]>
adds CheckLabelShaped transform under monai.apps.auto3dseg: - to check if image shape and label shape are the same. Currently, we usually don't check for it, which results in potentially a non-descriptive crash later, when computing loss or metric. - to correct label shape if it is very similar to image shape. Unfortunately some datasets, such as Hecktor22, has some labels (masks) with a slightly different shapes (difference in only 1 voxel). And because of that a user will have to either re-save the whole dataset, or account for it during the training loop (which is inconvenient). this utility auto corrects it. We also already have this auto-correction in DataAnalyzer, and with this transform, DataAnalyzer logic is simplified. Signed-off-by: myron <[email protected]> Signed-off-by: Wenqi Li <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Wenqi Li <[email protected]> Co-authored-by: Wenqi Li <[email protected]>
Fixes #5573 When using CacheDataset , and DataLoader num_workers==0, we convert ProxyList to List in disable_share_memory_cache() but if we're already inside DDP (DistributedDataParallel), we should not do such conversion, as it will crash. we should continue using ProxyList() ### 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). - [ ] 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. Signed-off-by: myron <[email protected]> Co-authored-by: Wenqi Li <[email protected]>
Signed-off-by: binliu <[email protected]> Fixes #5385 . ### Description This PR is about to enhance the mlflow handler in monai to track more details in the experiment. Here are a few enhancements that needs to be added through this PR. - API for users to add experiment/run name in MLFlow - API for users to log customized params for each run - Methods to log result images - Methods to log optimizer params - (optional) additional metric_names as a user argument to override the default engine.state.metrics to instruct MLFlow about metrics to log After adding these enhancements, some tests listed below should be excuted. - Make sure this handler works in multi-gpu environment - Make sure this handler works in all existed bundles ### 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). - [x] New tests added to cover the changes. - [x] 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. - [x] Documentation updated, tested `make html` command in the `docs/` folder. - [x] API for users to add experiment/run name in MLFlow - [x] API for users to log customized params for each run - [x] Methods to log result images - [x] Methods to log optimizer params - [x] Make sure this handler works in multi-gpu environment - [ ] Make sure this handler works in all existed bundles Signed-off-by: binliu <[email protected]> Co-authored-by: Nic Ma <[email protected]>
Fixes #5613 ### Description - `runtime_cache=False`: the default v1.0.1 behaviour - `runtime_cache=True` or `"thread"`: single process, for caching cuda tensors - `runtime_cache="process"`: single process workflow + multiprocess dataloader - `runtime_cache=` user-provided object, could be used to pass a container shared among processes I feel in this way the user can determine what to use instead of guessing and providing an automated solution... let me know what you think @myron @Nic-Ma, I'm fine if this is eventually merged or not merged ### 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). - [ ] 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. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: function2 <[email protected]> Fixes #5634. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [ ] Non-breaking change (fix or new feature that would not break existing functionality). - [x] 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. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: function2 <[email protected]>
Signed-off-by: monai-bot <[email protected]> Signed-off-by: monai-bot <[email protected]>
Signed-off-by: Wenqi Li <[email protected]> part of #5637 ### 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). - [ ] 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. Signed-off-by: Wenqi Li <[email protected]>
Fixes #5605. ### Description Fix missing type annotations so `./runtests.sh --mypy` now finds 0 warnings. ### 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). - [ ] 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`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Felix Schnabel <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
AutoRunner class improvements - adds auto-runner option **templates_path_or_url** to optionally accept a local templates folder location. The default (None) is the same: to download the release zip e.g. AutoRunner(templates_path_or_url='/my/local/algorithm_templates') - enhances **algos** input option to define a subset of algorithm names to run (e.g. AutoRunner(algos=['segresnet','dints']) ### 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). - [ ] 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: myron <[email protected]>
Fixes #5616 Fixes #5617 ### 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] Breaking change (fix or new feature that would cause existing functionality to change). - [x] New tests added to cover the changes. - [x] 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. - [x] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: Behrooz <[email protected]>
### Description
We've had feedback that with MetaTensors, `x.__repr__` is overly
verbose. This is used frequently when debugging with an IDE for example.
The problem is accentuated with e.g., `x.max()`. Here, a single value is
hidden by over 50 lines of text.
Example:
```python
import monai.transforms as mt
loader = mt.LoadImage(image_only=True)
x = loader(x)
print(x.max().__repr__())
```
<details>
<summary>Output</summary>
```
tensor(2906.1714)
Metadata
sizeof_hdr: 348
extents: 0
session_error: 0
dim_info: 0
dim: [ 3 161 338 61 1 1 1 1]
intent_p1: 0.0
intent_p2: 0.0
intent_p3: 0.0
intent_code: 0
datatype: 16
bitpix: 32
slice_start: 0
pixdim: [1. 1. 1. 2.000296 0. 0. 0. 0. ]
vox_offset: 0.0
scl_slope: nan
scl_inter: nan
slice_end: 0
slice_code: 0
xyzt_units: 2
cal_max: 0.0
cal_min: 0.0
slice_duration: 0.0
toffset: 0.0
glmax: 0
glmin: 0
qform_code: 1
sform_code: 0
quatern_b: -0.4889228641986847
quatern_c: 0.5108369588851929
quatern_d: -0.4703003466129303
qoffset_x: -77.69402313232422
qoffset_y: 218.0015411376953
qoffset_z: -808.5780029296875
srow_x: [0. 0. 0. 0.]
srow_y: [0. 0. 0. 0.]
srow_z: [0. 0. 0. 0.]
affine: tensor([[ 3.5726e-02, -2.8526e-03, 1.9990e+00, -7.7694e+01],
[-9.9619e-01, 7.9544e-02, 7.1691e-02, 2.1800e+02],
[-7.9595e-02, -9.9683e-01, 1.3722e-07, -8.0858e+02],
[ 0.0000e+00, 0.0000e+00, 0.0000e+00, 1.0000e+00]],
dtype=torch.float64)
original_affine: [[ 3.57263708e-02 -2.85262855e-03 1.99901100e+00 -7.76940231e+01]
[-9.96186848e-01 7.95440337e-02 7.16907652e-02 2.18001541e+02]
[-7.95951681e-02 -9.96827272e-01 1.37223043e-07 -8.08578003e+02]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]]
as_closest_canonical: False
spatial_shape: [161 338 61]
space: RAS
original_channel_dim: no_channel
filename_or_obj: /Users/rich/Downloads/sub-verse004_ct.nii.gz
Applied operations
[]
Is batch?: False
```
</details>
I'm proposing that the `__repr__` and `__str__` match that of
`torch.Tensor`. If users want meta data they can use `x.print_verbose()`
or `print(x.meta)`.
### 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).
- [x] Breaking change (fix or new feature that would cause existing
functionality to change).
- [x] New tests added to cover the changes.
- [x] In-line docstrings updated.
- [x] Documentation updated, tested `make html` command in the `docs/`
folder.
Signed-off-by: Richard Brown <[email protected]>
Follow up of issue #5530 #5528 and (closed) PR #5547 ### Description Add test case for a binary classification task in `test_vis_gradcam` ### 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). - [x] New tests added to cover the changes. - [x] In-line docstrings updated. Signed-off-by: Geevarghese George <[email protected]>
Fixes #5649 . ### Description Add the `auto_close` parameter to mlflow_handler so that it can close the mlflow run according to given value. Update the default handler parameter, so that trainer and evaluator could have `True` value on `auto_close`. ### 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). - [ ] 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. Signed-off-by: binliu <[email protected]>
The line `optional_import("cv2")` causes the security light of my macOS
to light up in green, even for the lowest level command e.g., `import
monai`. I was worried I had a virus until I realised what was causing
it! To avoid worrying other users, I suggest we only import when a user
is using the `VideoDataset`.
### 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).
Signed-off-by: Richard Brown <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>
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.
Fixes # .
Description
A few sentences describing the changes proposed in this pull request.
Status
Ready/Work in progress/Hold
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.