facebookresearch / av_hubert
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 215 units with 2,769 lines of code in units (34.5% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (141 lines of code)
    • 11 medium complex units (467 lines of code)
    • 20 simple units (733 lines of code)
    • 183 very simple units (1,428 lines of code)
0% | 5% | 16% | 26% | 51%
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% | 5% | 16% | 26% | 51%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
avhubert0% | 8% | 17% | 19% | 53%
avhubert/preparation0% | 0% | 23% | 44% | 32%
avhubert/clustering0% | 0% | 0% | 20% | 79%
avhubert/misc0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _main()
in avhubert/infer_s2s.py
141 27 2
def forward()
in avhubert/hubert_criterion.py
64 20 5
def collater()
in avhubert/hubert_dataset.py
51 20 2
def make_short_manifest()
in avhubert/preparation/lrs3_prepare.py
63 17 2
def main()
in avhubert/preparation/lrs3_manifest.py
60 15 0
def make_musan_tsv()
in avhubert/preparation/noise_manifest.py
40 14 2
def extract_finetune()
in avhubert/hubert.py
39 14 6
def reduce_metrics()
in avhubert/hubert_criterion.py
23 13 1
def load_audio_visual()
in avhubert/hubert_dataset.py
38 12 7
def landmarks_interpolate()
in avhubert/preparation/align_mouth.py
16 12 1
def generate_batched_itr()
in avhubert/sequence_generator.py
23 11 5
def apply_input_mask()
in avhubert/hubert.py
50 11 4
def load_dataset()
in avhubert/hubert_pretraining.py
46 10 3
def load_feature()
in avhubert/hubert_dataset.py
31 10 2
def add_noise()
in avhubert/hubert_dataset.py
28 10 2
def main()
in avhubert/preparation/lrs3_noise.py
54 10 0
def make_musan_babble()
in avhubert/preparation/musan_prepare.py
31 10 3
def trim_video_frame()
in avhubert/preparation/lrs3_prepare.py
41 9 6
def cut_patch()
in avhubert/preparation/align_mouth.py
21 9 5
def main()
in avhubert/preparation/vox_manifest.py
36 9 0