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

fetch upstream updates #65

Merged
merged 4 commits into from
May 27, 2022
Merged

fetch upstream updates #65

merged 4 commits into from
May 27, 2022

Conversation

wdika
Copy link
Owner

@wdika wdika commented May 27, 2022

No description provided.

@wdika wdika self-assigned this May 27, 2022
@wdika wdika added documentation Improvements or additions to documentation enhancement New feature or request labels May 27, 2022
Copy link
Contributor

@code-review-doctor code-review-doctor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth considering. View full project report here.

mridc/core/connectors/save_restore_connector.py Outdated Show resolved Hide resolved
Co-authored-by: code-review-doctor[bot] <72320148+code-review-doctor[bot]@users.noreply.github.com>
@codecov
Copy link

codecov bot commented May 27, 2022

Codecov Report

Merging #65 (b68ccdf) into main (80291c0) will increase coverage by 0.20%.
The diff coverage is 51.98%.

@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   56.36%   56.57%   +0.20%     
==========================================
  Files         170      171       +1     
  Lines       10057    10222     +165     
==========================================
+ Hits         5669     5783     +114     
- Misses       4388     4439      +51     
Impacted Files Coverage Δ
mridc/core/classes/module.py 0.00% <0.00%> (ø)
mridc/core/optim/optimizer_with_master_params.py 0.00% <0.00%> (ø)
mridc/core/classes/modelPT.py 25.37% <11.11%> (+0.58%) ⬆️
mridc/core/connectors/save_restore_connector.py 23.04% <45.45%> (+1.22%) ⬆️
tests/core/test_exp_manager.py 96.96% <96.96%> (ø)
mridc/core/classes/common.py 32.93% <100.00%> (ø)
mridc/utils/exp_manager.py 28.18% <0.00%> (+2.27%) ⬆️

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented May 27, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 17.39 🙂 16.79 🙂 -0.60 👍
Method Length 61.88 🙂 62.93 🙂 1.05 👎
Working memory 11.25 😞 11.17 😞 -0.08 👍
Quality 51.75% 🙂 52.08% 🙂 0.33% 👍
Other metrics Before After Change
Lines 2744 2879 135
Changed files Quality Before Quality After Quality Change
mridc/core/classes/common.py 47.76% 😞 47.76% 😞 0.00%
mridc/core/classes/modelPT.py 47.42% 😞 48.40% 😞 0.98% 👍
mridc/core/classes/module.py 96.34% ⭐ 87.82% ⭐ -8.52% 👎
mridc/core/connectors/save_restore_connector.py 53.38% 🙂 53.40% 🙂 0.02% 👍
mridc/core/optim/optimizer_with_master_params.py 60.18% 🙂 57.85% 🙂 -2.33% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
mridc/core/optim/optimizer_with_master_params.py MainParamsOptimizerWrapper.__init__ 52 ⛔ 394 ⛔ 19 ⛔ 9.01% ⛔ 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 ⛔ 465 ⛔ 19 ⛔ 10.73% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/common.py Serialization.from_config_dict 40 ⛔ 231 ⛔ 19 ⛔ 16.92% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/modelPT.py ModelPT.setup_optimization 38 ⛔ 471 ⛔ 13 😞 18.04% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/common.py Typing._validate_input_types 22 😞 281 ⛔ 18 ⛔ 23.76% ⛔ 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!

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented May 27, 2022

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 17.39 🙂 16.79 🙂 -0.60 👍
Method Length 61.88 🙂 62.93 🙂 1.05 👎
Working memory 11.25 😞 11.17 😞 -0.08 👍
Quality 51.75% 🙂 52.08% 🙂 0.33% 👍
Other metrics Before After Change
Lines 2744 2879 135
Changed files Quality Before Quality After Quality Change
mridc/core/classes/common.py 47.76% 😞 47.76% 😞 0.00%
mridc/core/classes/modelPT.py 47.42% 😞 48.40% 😞 0.98% 👍
mridc/core/classes/module.py 96.34% ⭐ 87.82% ⭐ -8.52% 👎
mridc/core/connectors/save_restore_connector.py 53.38% 🙂 53.40% 🙂 0.02% 👍
mridc/core/optim/optimizer_with_master_params.py 60.18% 🙂 57.85% 🙂 -2.33% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
mridc/core/optim/optimizer_with_master_params.py MainParamsOptimizerWrapper.__init__ 52 ⛔ 394 ⛔ 19 ⛔ 9.01% ⛔ 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 ⛔ 465 ⛔ 19 ⛔ 10.73% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/common.py Serialization.from_config_dict 40 ⛔ 231 ⛔ 19 ⛔ 16.92% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/modelPT.py ModelPT.setup_optimization 38 ⛔ 471 ⛔ 13 😞 18.04% ⛔ Refactor to reduce nesting. Try splitting into smaller methods. Extract out complex expressions
mridc/core/classes/common.py Typing._validate_input_types 22 😞 281 ⛔ 18 ⛔ 23.76% ⛔ 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!

@sonarcloud
Copy link

sonarcloud bot commented May 27, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@wdika wdika merged commit abe1aa8 into main May 27, 2022
@wdika wdika deleted the fetch-upstream branch May 27, 2022 14:38
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