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

bump to 0.2.0 #101

Merged
merged 2 commits into from
Sep 12, 2022
Merged

bump to 0.2.0 #101

merged 2 commits into from
Sep 12, 2022

Conversation

wdika
Copy link
Owner

@wdika wdika commented Sep 12, 2022

No description provided.

@wdika wdika added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 12, 2022
@wdika wdika self-assigned this Sep 12, 2022
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Sep 12, 2022

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 0.12%.

Quality metrics Before After Change
Complexity 14.18 🙂 13.95 🙂 -0.23 👍
Method Length 84.27 🙂 84.97 🙂 0.70 👎
Working memory 9.77 🙂 9.82 🙂 0.05 👎
Quality 53.03% 🙂 53.15% 🙂 0.12% 👍
Other metrics Before After Change
Lines 5307 5562 255
Changed files Quality Before Quality After Quality Change
mridc/package_info.py 83.20% ⭐ 83.20% ⭐ 0.00%
mridc/collections/common/data/dataset.py 52.86% 🙂 54.14% 🙂 1.28% 👍
mridc/collections/common/parts/patch_utils.py 98.50% ⭐ 98.50% ⭐ 0.00%
mridc/core/classes/export.py 46.85% 😞 46.99% 😞 0.14% 👍
mridc/core/classes/modelPT.py 46.02% 😞 46.02% 😞 0.00%
mridc/core/conf/schedulers.py 61.58% 🙂 59.28% 🙂 -2.30% 👎
mridc/core/conf/trainer.py 70.60% 🙂 72.38% 🙂 1.78% 👍
mridc/core/optim/lr_scheduler.py 56.59% 🙂 57.08% 🙂 0.49% 👍
mridc/core/optim/optimizer_with_master_params.py 53.90% 🙂 54.72% 🙂 0.82% 👍
mridc/utils/exp_manager.py 49.19% 😞 48.47% 😞 -0.72% 👎
mridc/utils/export_utils.py 77.44% ⭐ 77.24% ⭐ -0.20% 👎
mridc/utils/get_rank.py 90.24% ⭐ 90.96% ⭐ 0.72% 👍
tests/core/test_optimizers_schedulers.py 50.40% 🙂 49.84% 😞 -0.56% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
mridc/core/optim/lr_scheduler.py prepare_lr_scheduler 50 ⛔ 553 ⛔ 22 ⛔ 6.50% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/optim/optimizer_with_master_params.py MainParamsOptimizerWrapper.__init__ 53 ⛔ 506 ⛔ 19 ⛔ 7.91% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/modelPT.py ModelPT.maybe_init_from_pretrained_checkpoint 41 ⛔ 539 ⛔ 19 ⛔ 10.37% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/modelPT.py ModelPT.setup_optimization 41 ⛔ 675 ⛔ 14 😞 15.12% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/export.py Exportable._export 18 🙂 415 ⛔ 25 ⛔ 19.96% ⛔ 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!

@codecov
Copy link

codecov bot commented Sep 12, 2022

Codecov Report

Merging #101 (c083047) into main (c0fdae4) will increase coverage by 1.09%.
The diff coverage is 19.04%.

@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   54.84%   55.93%   +1.09%     
==========================================
  Files         196      187       -9     
  Lines       13130    12981     -149     
==========================================
+ Hits         7201     7261      +60     
+ Misses       5929     5720     -209     
Impacted Files Coverage Δ
mridc/collections/common/data/dataset.py 0.00% <0.00%> (ø)
mridc/collections/common/parts/patch_utils.py 0.00% <0.00%> (ø)
mridc/collections/common/parts/training_utils.py 0.00% <0.00%> (ø)
mridc/core/classes/export.py 0.00% <0.00%> (ø)
mridc/core/classes/modelPT.py 33.12% <0.00%> (ø)
mridc/core/optim/optimizer_with_master_params.py 0.00% <0.00%> (ø)
mridc/utils/debug_hook.py 0.00% <0.00%> (ø)
mridc/utils/exp_manager.py 27.80% <0.00%> (-0.64%) ⬇️
mridc/core/optim/lr_scheduler.py 74.74% <52.63%> (+4.69%) ⬆️
mridc/utils/get_rank.py 80.00% <66.66%> (-3.34%) ⬇️
... and 16 more

@wdika wdika merged commit 076b5e7 into main Sep 12, 2022
@wdika wdika deleted the 0.2.0 branch September 12, 2022 09:15
wdika added a commit that referenced this pull request Oct 12, 2022
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
Development

Successfully merging this pull request may close these issues.

1 participant