awslabs / sagemaker-graph-entity-resolution
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 65 units with 741 lines of code in units (52.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (47 lines of code)
    • 6 simple units (131 lines of code)
    • 58 very simple units (563 lines of code)
0% | 0% | 6% | 17% | 75%
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% | 6% | 17% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution0% | 0% | 10% | 28% | 61%
source/sagemaker/baseline0% | 0% | 0% | 0% | 100%
source/sagemaker/data-preprocessing0% | 0% | 0% | 0% | 100%
source/sagemaker/data-preparation0% | 0% | 0% | 0% | 100%
deployment/solution-assistant/src0% | 0% | 0% | 0% | 100%
source/sagemaker/sagemaker_graph_entity_resolution0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def inference()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/model.py
47 18 8
def __init__()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/model.py
19 10 5
def forward()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/model.py
9 9 3
def construct_graph()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/graph.py
37 8 6
def forward()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/model.py
12 8 4
def train()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/train_dgl_pytorch_entity_resolution.py
35 8 16
def parse_edgelist()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/data.py
19 6 4
def filter_o()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
9 5 5
def filter_s()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
9 5 5
def convert_to_adj_list()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
14 5 2
def get_current_folder()
in source/sagemaker/sagemaker_graph_entity_resolution/config.py
7 4 1
def convert_to_adj_list()
in source/sagemaker/baseline/train_pytorch_mlp_entity_resolution.py
12 4 2
def train()
in source/sagemaker/baseline/train_pytorch_mlp_entity_resolution.py
23 4 7
def merge_websites_with_user_visits()
in source/sagemaker/data-preparation/data_prep.py
11 3 6
def preprocess_timestamp()
in source/sagemaker/data-preprocessing/data_preprocessing.py
6 3 1
def _get_node_idx()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/data.py
14 3 4
def get_features()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/data.py
17 3 2
def __init__()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/model.py
5 3 4
def get_loss()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/model.py
5 3 5
def perturb_and_get_raw_rank()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
18 3 7