BayesWatch / pytorch-experiments-template

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

Implement a more general form of model argument passing that covers a… #48

Closed AntreasAntoniou closed 3 years ago

AntreasAntoniou commented 3 years ago

…ll model definitions

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

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

Quality metrics Before After Change
Complexity 7.62 ⭐ 7.32 ⭐ -0.30 👍
Method Length 76.59 🙂 76.68 🙂 0.09 👎
Working memory 12.82 😞 12.60 😞 -0.22 👍
Quality 58.34% 🙂 59.18% 🙂 0.84% 👍
Other metrics Before After Change
Lines 1868 1961 93
Changed files Quality Before Quality After Quality Change
train.py 29.48% 😞 29.04% 😞 -0.44% 👎
datasets/dataset_loading_hub.py 69.79% 🙂 69.79% 🙂 0.00%
models/init.py 65.51% 🙂 61.37% 🙂 -4.14% 👎
models/auto_builder_models.py 63.31% 🙂 63.30% 🙂 -0.01% 👎
test/auto_builder_models_test.py 75.91% ⭐ 77.21% ⭐ 1.30% 👍
utils/arg_parsing.py 71.28% 🙂 70.50% 🙂 -0.78% 👎
utils/metric_tracking.py 56.32% 🙂 56.53% 🙂 0.21% 👍

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

File Function Complexity Length Working Memory Quality Recommendation
models/auto_builder_models.py BatchRelationalModule.forward 13 🙂 373 ⛔ 15 😞 31.20% 😞 Try splitting into smaller methods. Extract out complex expressions
models/auto_builder_models.py BatchRelationalModule.build 13 🙂 451 ⛔ 14 😞 31.54% 😞 Try splitting into smaller methods. Extract out complex expressions
utils/metric_tracking.py MetricTracker.refresh_best_n_epoch_models 10 🙂 142 😞 18 ⛔ 43.22% 😞 Try splitting into smaller methods. Extract out complex expressions
utils/metric_tracking.py MetricTracker.plot 6 ⭐ 184 😞 14 😞 47.14% 😞 Try splitting into smaller methods. Extract out complex expressions
models/auto_builder_models.py ClassificationModel.build 3 ⭐ 169 😞 17 ⛔ 48.05% 😞 Try splitting into smaller methods. 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.