facebookresearch / Listen-to-Look
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 138 units with 2,223 lines of code in units (87.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 11 medium complex units (728 lines of code)
    • 7 simple units (221 lines of code)
    • 120 very simple units (1,274 lines of code)
0% | 0% | 32% | 9% | 57%
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% | 32% | 9% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
listen_to_look_single_modality0% | 0% | 49% | 7% | 43%
ROOT0% | 0% | 47% | 8% | 43%
listen_to_look_single_modality/utils0% | 0% | 19% | 7% | 73%
utils0% | 0% | 18% | 7% | 73%
listen_to_look_single_modality/models0% | 0% | 25% | 8% | 66%
models0% | 0% | 0% | 27% | 72%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def train_epoch()
in listen_to_look_single_modality/train.py
98 14 11
93 14 11
def main()
in listen_to_look_single_modality/main.py
86 13 1
def main()
in main.py
90 13 1
def align_and_update_state_dicts()
in listen_to_look_single_modality/utils/model_serialization.py
30 12 2
def process_list_tensors()
in listen_to_look_single_modality/utils/utils.py
30 12 4
def validate()
in listen_to_look_single_modality/validate.py
104 12 8
def align_and_update_state_dicts()
in utils/model_serialization.py
30 12 2
29 12 4
def validate()
in validate.py
90 12 8
def forward()
in listen_to_look_single_modality/models/audioPreview_model.py
48 11 7
def load()
in listen_to_look_single_modality/utils/checkpointer.py
22 9 2
def load()
in utils/checkpointer.py
22 9 2
def forward()
in models/audioPreview_model.py
56 9 6
def build_mlp()
in listen_to_look_single_modality/models/networks.py
16 7 6
def build_mlp()
in models/networks.py
16 7 6
def main()
in listen_to_look_single_modality/validate.py
42 6 1
def main()
in validate.py
47 6 1
def save()
in listen_to_look_single_modality/utils/checkpointer.py
17 5 4
def get_lr()
in listen_to_look_single_modality/utils/scheduler.py
14 5 1