facebookresearch / FashionPlus
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 293 units with 3,460 lines of code in units (84.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (77 lines of code)
    • 10 medium complex units (386 lines of code)
    • 39 simple units (961 lines of code)
    • 243 very simple units (2,036 lines of code)
0% | 2% | 11% | 27% | 58%
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% | 2% | 11% | 27% | 58%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
generation/models0% | 6% | 11% | 35% | 46%
generation/data0% | 0% | 30% | 13% | 55%
separate_vae/models0% | 0% | 13% | 30% | 56%
separate_vae/util0% | 0% | 20% | 13% | 65%
separate_vae0% | 0% | 45% | 0% | 54%
separate_vae/data0% | 0% | 15% | 10% | 74%
generation/options0% | 0% | 0% | 72% | 27%
classification0% | 0% | 0% | 65% | 34%
generation0% | 0% | 0% | 70% | 29%
generation/util0% | 0% | 0% | 37% | 62%
separate_vae/options0% | 0% | 0% | 44% | 55%
classification/data_dict0% | 0% | 0% | 3% | 96%
postprocess0% | 0% | 0% | 0% | 100%
preprocess0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def initialize()
in generation/models/pix2pixHD_model.py
77 31 2
def forward_and_reparameterize()
in generation/models/networks.py
36 20 4
def forward()
in generation/models/pix2pixHD_model.py
52 16 6
def display_current_results()
in separate_vae/util/visualizer.py
47 13 4
def initialize()
in separate_vae/models/separate_clothing_encoder_models.py
34 13 2
def load_network()
in generation/models/base_model.py
35 13 5
def load_network()
in separate_vae/models/separate_clothing_encoder_models.py
32 12 5
def __getitem__()
in generation/data/pickle_dataset.py
54 12 2
def batch_generation_from_update()
in separate_vae/decode_masks.py
44 11 7
def get_transform()
in separate_vae/data/base_dataset.py
26 11 5
def get_transform()
in generation/data/base_dataset.py
26 11 5
def parse()
in separate_vae/options/base_options.py
30 10 2
def generation_from_decoded_mask()
in generation/decode_clothing_features.py
60 10 15
def parse()
in generation/options/base_options.py
28 10 2
def forward()
in generation/models/networks.py
18 10 4
def encode_input()
in generation/models/pix2pixHD_model.py
21 10 6
def broadcast_features()
in generation/models/pix2pixHD_model.py
25 10 5
def forward()
in separate_vae/models/separate_clothing_encoder_models.py
52 9 6
def load_network()
in classification/model.py
33 8 4
def build_conv_block()
in separate_vae/models/pix2pixhd_networks.py
28 8 6