BayesWatch / pytorch-experiments-template

A pytorch based classification experiments template
GNU General Public License v3.0
5 stars 1 forks source link

Apply 88 char line lengths and a single sourcely refactor #69

Closed AntreasAntoniou closed 3 years ago

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 12.71 🙂 12.90 🙂 0.19 👎
Method Length 186.50 😞 184.50 😞 -2.00 👍
Working memory 16.40 ⛔ 16.48 ⛔ 0.08 👎
Quality 41.76% 😞 41.49% 😞 -0.27% 👎
Other metrics Before After Change
Lines 400 398 -2
Changed files Quality Before Quality After Quality Change
train.py 41.76% 😞 41.49% 😞 -0.27% 👎

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

File Function Complexity Length Working Memory Quality Recommendation
train.py housekeeping 7 ⭐ 168 😞 9 🙂 56.28% 🙂 Try splitting into smaller methods
train.py get_base_argument_parser 0 ⭐ 232 ⛔ 9 🙂 58.32% 🙂 Try splitting into smaller methods
train.py train 1 ⭐ 92 🙂 12 😞 65.49% 🙂 Extract out complex expressions
train.py eval 1 ⭐ 72 🙂 12 😞 68.42% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

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!

Let us know what you think of it by mentioning @sourcery-ai in a comment.