facebookresearch / em-pose
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 172 units with 2,303 lines of code in units (90.6% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (149 lines of code)
    • 4 medium complex units (268 lines of code)
    • 15 simple units (461 lines of code)
    • 152 very simple units (1,425 lines of code)
0% | 6% | 11% | 20% | 61%
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% | 6% | 11% | 20% | 61%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
scripts0% | 41% | 30% | 14% | 14%
empose/nn0% | 0% | 17% | 19% | 62%
empose/data0% | 0% | 7% | 10% | 82%
empose/helpers0% | 0% | 0% | 32% | 67%
empose/eval0% | 0% | 0% | 25% | 74%
empose/bodymodels0% | 0% | 0% | 50% | 50%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in scripts/train.py
149 27 1
def main()
in scripts/evaluate_real.py
56 18 1
def forward()
in empose/nn/models.py
111 17 4
def convert_3dpw_to_lmdb()
in scripts/preprocess_amass_3dpw.py
54 13 2
def __call__()
in empose/data/transforms.py
47 11 2
def evaluate()
in empose/eval/helpers.py
33 10 5
def convert_amass_to_lmdb()
in scripts/preprocess_amass_3dpw.py
52 9 2
def get_metrics()
in empose/eval/metrics.py
32 8 3
def __init__()
in empose/helpers/configuration.py
82 8 1
def __init__()
in empose/nn/models.py
17 7 3
def backward()
in empose/nn/models.py
43 7 5
def __init__()
in empose/eval/metrics.py
14 7 2
def get_inputs()
in empose/data/data.py
20 7 4
def backward()
in empose/nn/models.py
31 6 5
def backward()
in empose/nn/models.py
32 6 5
def get_end_to_end_preprocess_fn()
in empose/data/transforms.py
21 6 3
def get_noise_fn()
in empose/data/noise_functions.py
20 6 3
def _fk()
in empose/bodymodels/smpl.py
21 6 6
def fk()
in empose/bodymodels/smpl.py
19 6 7
def local_to_global()
in empose/helpers/utils.py
24 6 4