facebookresearch / GraphLog
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 337 units with 3,990 lines of code in units (71.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (81 lines of code)
    • 11 medium complex units (652 lines of code)
    • 35 simple units (1,098 lines of code)
    • 290 very simple units (2,159 lines of code)
0% | 2% | 16% | 27% | 54%
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% | 16% | 27% | 54%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
experiments/codes/utils0% | 10% | 6% | 16% | 65%
experiments/codes/experiment0% | 0% | 32% | 40% | 27%
experiments/codes/model0% | 0% | 15% | 32% | 52%
graphlog0% | 0% | 15% | 6% | 77%
experiments/scripts0% | 0% | 0% | 42% | 57%
experiments/codes/logbook0% | 0% | 0% | 21% | 78%
experiments/codes/testtube0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
experiments/codes/app0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def load_data_pyg()
in experiments/codes/utils/data.py
81 32 2
def adapt()
in experiments/codes/experiment/inference.py
87 22 7
def run()
in experiments/codes/experiment/checkpointable_multitask_experiment.py
44 18 1
def load_data()
in graphlog/dataset.py
76 17 2
def load_data_dgl()
in experiments/codes/utils/data.py
51 15 2
def forward()
in experiments/codes/model/gat/sig_edge_gat.py
43 12 2
def forward()
in experiments/codes/model/gat/sig_edge_gat.py
42 11 2
def __init__()
in experiments/codes/model/gat/sig_edge_gat.py
110 11 3
def forward()
in experiments/codes/model/gcn/gcn.py
35 11 2
def run_sequential_multitask_training()
in experiments/codes/experiment/checkpointable_multitask_experiment.py
46 11 1
def run_sequential_multitask_unique_composition()
in experiments/codes/experiment/checkpointable_multitask_experiment.py
59 11 1
def run_sequential_multitask_unique_representation()
in experiments/codes/experiment/checkpointable_multitask_experiment.py
59 11 1
def get_param()
in experiments/codes/utils/util.py
20 10 5
def __init__()
in experiments/codes/model/gat/sig_edge_gat.py
71 10 3
def run_multitask_training_unique_composition()
in experiments/codes/experiment/checkpointable_multitask_experiment.py
56 10 1
def run_multitask_training_unique_representation()
in experiments/codes/experiment/checkpointable_multitask_experiment.py
55 10 1
def run_single_task()
in experiments/codes/experiment/checkpointable_multitask_experiment.py
43 9 2
def eval_continual_comp()
in experiments/scripts/eval_supervised.py
54 8 3
def forward()
in experiments/codes/model/gat/layers.py
24 8 7
def forward()
in experiments/codes/model/gat/layers.py
19 8 7