janfreyberg / superintendent

Practical active learning in python
https://superintendent.readthedocs.io
189 stars 18 forks source link

Add experiment class #61

Open janfreyberg opened 3 years ago

sourcery-ai[bot] commented 3 years ago

Sourcery Code Quality Report

This PR has an average code quality of 81.14%

Quality metrics Before After Change
Complexity 2.25 ⭐
Method Length 49.95 ⭐
Working memory 7.55 🙂
Quality % 81.14% %
Other metrics Before After Change
Lines 840
Changed files Quality Before Quality After Quality Change
src/superintendent/base.py % 81.97% ⭐ %
src/superintendent/acquisition_functions/init.py % 73.16% 🙂 %
src/superintendent/acquisition_functions/decorators.py % 78.34% ⭐ %
src/superintendent/acquisition_functions/functions.py % 88.29% ⭐ %
src/superintendent/experiments/init.py % 77.33% ⭐ %

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

File Function Complexity Length Working Memory Quality Recommendation
src/superintendent/base.py Labeller.__init__ 7 ⭐ 296 ⛔ 21 ⛔ 33.59% 😞 Try splitting into smaller methods. Extract out complex expressions
src/superintendent/base.py Labeller.retrain 9 🙂 206 ⛔ 15 😞 41.30% 😞 Try splitting into smaller methods. Extract out complex expressions
src/superintendent/acquisition_functions/decorators.py make_acquisition_function 13 🙂 120 😞 15 😞 46.13% 😞 Try splitting into smaller methods. Extract out complex expressions
src/superintendent/acquisition_functions/decorators.py make_acquisition_function.decorator 10 🙂 113 🙂 15 😞 49.69% 😞 Extract out complex expressions
src/superintendent/acquisition_functions/decorators.py _is_multioutput 4 ⭐ 54 ⭐ 15 😞 63.99% 🙂 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.