Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

quantitative #82

Merged
merged 12 commits into from
Sep 12, 2022
Merged

quantitative #82

merged 12 commits into from
Sep 12, 2022

Conversation

wdika
Copy link
Owner

@wdika wdika commented Aug 19, 2022

initial implementation of the qRIM paper

* adds pytests & fixed logic for qMRI paper results
@wdika wdika self-assigned this Aug 19, 2022
@wdika wdika added documentation Improvements or additions to documentation enhancement New feature or request labels Aug 19, 2022
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Aug 19, 2022

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 1.63%.

Quality metrics Before After Change
Complexity 8.58 🙂 8.63 🙂 0.05 👎
Method Length 121.40 😞 134.93 😞 13.53 👎
Working memory 9.58 🙂 10.02 😞 0.44 👎
Quality 53.84% 🙂 52.21% 🙂 -1.63% 👎
Other metrics Before After Change
Lines 5163 5916 753
Changed files Quality Before Quality After Quality Change
mridc/launch.py 27.90% 😞 24.83% ⛔ -3.07% 👎
mridc/collections/common/losses/ssim.py 62.82% 🙂 60.81% 🙂 -2.01% 👎
mridc/collections/reconstruction/models/base.py 52.01% 🙂 52.01% 🙂 0.00%
mridc/collections/reconstruction/models/cirim.py 53.31% 🙂 53.31% 🙂 0.00%
mridc/collections/reconstruction/models/pics.py 48.55% 😞 49.32% 😞 0.77% 👍
mridc/core/classes/common.py 46.09% 😞 47.07% 😞 0.98% 👍
tests/collections/reconstruction/models/test_ccnn.py 52.96% 🙂 41.65% 😞 -11.31% 👎
tests/collections/reconstruction/models/test_cirim.py 40.02% 😞 38.26% 😞 -1.76% 👎
tests/collections/reconstruction/models/test_crnn.py 51.57% 🙂 40.61% 😞 -10.96% 👎
tests/collections/reconstruction/models/test_dunet.py 52.31% 🙂 41.54% 😞 -10.77% 👎
tests/collections/reconstruction/models/test_jointicnet.py 60.23% 🙂 48.08% 😞 -12.15% 👎
tests/collections/reconstruction/models/test_kikinet.py 60.52% 🙂 48.16% 😞 -12.36% 👎
tests/collections/reconstruction/models/test_lpdnet.py 60.23% 🙂 48.08% 😞 -12.15% 👎
tests/collections/reconstruction/models/test_multidomainnet.py 62.05% 🙂 52.64% 🙂 -9.41% 👎
tests/collections/reconstruction/models/test_recurrentvarnet.py 51.18% 🙂 41.32% 😞 -9.86% 👎
tests/collections/reconstruction/models/test_unet.py 53.21% 🙂 41.70% 😞 -11.51% 👎
tests/collections/reconstruction/models/test_vn.py 52.72% 🙂 41.61% 😞 -11.11% 👎
tests/collections/reconstruction/models/test_vsnet.py 52.96% 🙂 41.65% 😞 -11.31% 👎
tests/collections/reconstruction/models/test_xpdnet.py 60.37% 🙂 48.12% 😞 -12.25% 👎
tests/core/test_exp_manager.py 86.60% ⭐ 85.69% ⭐ -0.91% 👎
tests/core/test_optimizers_schedulers.py 50.38% 🙂 50.40% 🙂 0.02% 👍
tests/core/test_save_restore.py 69.59% 🙂 70.66% 🙂 1.07% 👍

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
mridc/launch.py main 21 😞 388 ⛔ 22 ⛔ 19.26% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/common.py Typing._validate_input_types 22 😞 321 ⛔ 18 ⛔ 22.45% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/common.py Serialization.from_config_dict 35 ⛔ 249 ⛔ 14 😞 22.66% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/common.py Typing._attach_and_validate_output_types 25 😞 256 ⛔ 16 ⛔ 24.81% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/common.py Model.from_pretrained 22 😞 235 ⛔ 19 ⛔ 25.20% 😞 Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

* added co-author, TODOs for quantitative
@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Merging #82 (eeb9d11) into main (1f6c876) will decrease coverage by 4.77%.
The diff coverage is 30.87%.

@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
- Coverage   59.61%   54.84%   -4.78%     
==========================================
  Files         178      196      +18     
  Lines       10864    13130    +2266     
==========================================
+ Hits         6477     7201     +724     
- Misses       4387     5929    +1542     
Impacted Files Coverage Δ
mridc/collections/common/losses/ssim.py 41.93% <0.00%> (+18.60%) ⬆️
mridc/collections/reconstruction/models/pics.py 0.00% <0.00%> (ø)
mridc/collections/reconstruction/models/zf.py 0.00% <0.00%> (ø)
mridc/launch.py 0.00% <0.00%> (ø)
...jects/quantitative/datasets/ahead/preprocessing.py 0.00% <0.00%> (ø)
projects/quantitative/datasets/ahead/reformat.py 0.00% <0.00%> (ø)
tests/core/test_optimizers_schedulers.py 82.43% <ø> (ø)
mridc/collections/reconstruction/data/mri_data.py 39.41% <2.56%> (+0.23%) ⬆️
mridc/collections/quantitative/parts/transforms.py 7.10% <7.10%> (ø)
...idc/collections/reconstruction/parts/transforms.py 7.44% <9.09%> (-0.08%) ⬇️
... and 41 more

@wdika
Copy link
Owner Author

wdika commented Sep 7, 2022

b5a0973 addresses #84, #85, #86

* added qmodels model zoo configs
* added readme for qMRI
* added ahead dataset preprocessing scripts
* 'Refactored by Sourcery'

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Sourcery AI <>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
sourcery-ai bot and others added 2 commits September 8, 2022 13:26
Co-authored-by: Sourcery AI <>
* changes on README
@wdika wdika merged commit c0fdae4 into main Sep 12, 2022
@wdika wdika deleted the quantitative branch September 12, 2022 06:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
1 participant