facebookresearch / label_dp_antipodes
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 140 units with 1,555 lines of code in units (65.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (232 lines of code)
    • 8 simple units (194 lines of code)
    • 129 very simple units (1,129 lines of code)
0% | 0% | 14% | 12% | 72%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 14% | 12% | 72%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 37% | 5% | 57%
memorization_attack0% | 0% | 61% | 0% | 38%
lib/pate0% | 0% | 9% | 24% | 65%
lib/models0% | 0% | 0% | 29% | 70%
lib0% | 0% | 0% | 7% | 92%
lib/dataset0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main_worker()
in train_cifar_alibi.py
145 20 1
def rdp_gaussian()
in lib/pate/accountant.py
34 14 3
def compute_eps()
in memorization_attack/attack.py
53 13 3
def post_process()
in lib/alibi.py
21 9 3
def run_analysis()
in lib/pate/accountant.py
71 7 4
def update()
in lib/models/ema.py
19 6 2
def forward()
in lib/models/wide_resnet.py
10 6 2
def __init__()
in lib/models/wide_resnet.py
35 6 5
def adjust_learning_rate()
in lib/pate/utils.py
9 6 3
7 6 4
def get_eps()
in train_student.py
22 6 2
def train()
in train_cifar_alibi.py
19 5 5
def rdp_data_independent_gaussian()
in lib/pate/accountant.py
8 5 2
def increase_budget()
in lib/alibi.py
15 5 2
def get_confidences()
in memorization_attack/attack.py
17 4 4
def __init__()
in lib/models/ema.py
10 4 4
def build_optimizer()
in lib/pate/utils.py
18 4 2
def _log1mexp()
in lib/pate/accountant.py
9 4 1
def noise()
in lib/alibi.py
12 4 2
def main()
in aggregate_votes.py
30 4 1