awslabs / sagemaker-graph-entity-resolution
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 65 units with 741 lines of code in units (52.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (190 lines of code)
    • 24 small units (365 lines of code)
    • 35 very small units (186 lines of code)
0% | 0% | 25% | 49% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 25% | 49% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution0% | 0% | 31% | 53% | 15%
source/sagemaker/baseline0% | 0% | 44% | 32% | 24%
source/sagemaker/data-preprocessing0% | 0% | 0% | 50% | 49%
deployment/solution-assistant/src0% | 0% | 0% | 72% | 27%
source/sagemaker/data-preparation0% | 0% | 0% | 38% | 61%
source/sagemaker/sagemaker_graph_entity_resolution0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def inference()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/model.py
47 18 8
def construct_graph()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/graph.py
37 8 6
def train()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/train_dgl_pytorch_entity_resolution.py
35 8 16
def parse_args()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/estimator_fns.py
27 1 0
def train()
in source/sagemaker/baseline/train_pytorch_mlp_entity_resolution.py
23 4 7
def read_data()
in source/sagemaker/baseline/train_pytorch_mlp_entity_resolution.py
21 3 5
def perturb_o_and_get_filtered_rank()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
20 3 7
def perturb_s_and_get_filtered_rank()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
20 3 7
def calc_filtered_mrr()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
20 3 5
def parse_args()
in source/sagemaker/baseline/train_pytorch_mlp_entity_resolution.py
20 1 0
def parse_edgelist()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/data.py
19 6 4
def __init__()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/model.py
19 10 5
def perturb_and_get_raw_rank()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
18 3 7
def get_features()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/data.py
17 3 2
def calc_mAP()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
17 2 4
def calc_raw_mrr()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
16 2 5
def process_logs()
in source/sagemaker/data-preprocessing/data_preprocessing.py
15 1 3
def _get_node_idx()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/data.py
14 3 4
def convert_to_adj_list()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/utils.py
14 5 2
def evaluate()
in source/sagemaker/sagemaker_graph_entity_resolution/dgl_entity_resolution/train_dgl_pytorch_entity_resolution.py
14 3 14