facebookresearch / fisher_information_loss
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 61 units with 1,118 lines of code in units (80.7% of code).
    • 0 very long units (0 lines of code)
    • 7 long units (421 lines of code)
    • 10 medium size units (279 lines of code)
    • 18 small units (293 lines of code)
    • 26 very small units (125 lines of code)
0% | 37% | 24% | 26% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 37% | 24% | 26% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 30% | 30% | 24% | 14%
scripts0% | 58% | 8% | 32% | 1%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in reweighted.py
75 8 1
def __init__()
in dataloading.py
65 25 6
def main()
in fisher_experiment.py
64 11 1
def private_mse_and_fil()
in scripts/make_figures.py
61 7 2
def run_inversion()
in private_model_inversion.py
54 11 4
def private_inversion_accuracy()
in scripts/make_figures.py
51 10 2
def irfil_inversion()
in scripts/make_figures.py
51 5 3
def fredrikson14_inverter()
in model_inversion.py
41 7 6
def line_plot()
in plotting.py
37 14 15
def run_inversion()
in model_inversion.py
32 8 3
def __init__()
in dataloading.py
29 8 5
def pca()
in dataloading.py
26 7 3
def view_images()
in scripts/make_figures.py
25 5 4
def train()
in models.py
23 5 5
def __init__()
in model_inversion.py
23 5 7
def main()
in private_model_inversion.py
22 7 1
def load_datasampler()
in dataloading.py
21 6 4
def eta_histogram()
in scripts/make_figures.py
20 3 5
def correlations()
in scripts/make_figures.py
20 2 3
def main()
in scripts/make_figures.py
20 8 1