facebookresearch / FaderNetworks
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 57 units with 883 lines of code in units (72.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (133 lines of code)
    • 13 simple units (316 lines of code)
    • 41 very simple units (434 lines of code)
0% | 0% | 15% | 35% | 49%
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% | 15% | 35% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 16% | 33% | 50%
data0% | 0% | 0% | 100% | 0%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_optimizer()
in src/utils.py
40 13 2
def __init__()
in src/training.py
46 12 7
def build_layers()
in src/model.py
47 11 11
def preprocess_images()
in data/preprocess.py
30 10 0
def autoencoder_step()
in src/training.py
40 10 1
def evaluate()
in src/evaluation.py
54 9 2
def eval_clf_accuracy()
in src/evaluation.py
23 8 1
def get_dump_path()
in src/utils.py
14 8 1
def reload_model()
in src/utils.py
24 8 3
def preprocess_attributes()
in data/preprocess.py
18 7 0
def eval_clf_dis_accuracy()
in src/evaluation.py
20 6 1
def create_logger()
in src/logger.py
20 6 1
def attr_flag()
in src/utils.py
15 6 1
def clip_grad_norm()
in src/utils.py
17 6 3
def load_images()
in src/loader.py
30 6 1
def save_best_periodic()
in src/training.py
11 6 2
def check_attr()
in src/utils.py
6 5 1
11 5 4
def train_batch()
in src/loader.py
9 5 2
def get_interpolations()
in interpolate.py
12 4 4