awslabs / sagemaker-graph-fraud-detection
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 96 units with 1,183 lines of code in units (54.7% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (204 lines of code)
    • 10 medium size units (289 lines of code)
    • 29 small units (395 lines of code)
    • 54 very small units (295 lines of code)
0% | 17% | 24% | 33% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 17% | 24% | 33% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/lambda/graph-modelling0% | 68% | 0% | 22% | 9%
source/lambda/data-preprocessing0% | 62% | 0% | 21% | 16%
source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection0% | 7% | 34% | 29% | 28%
source/sagemaker/sagemaker_graph_fraud_detection/container_build0% | 0% | 56% | 19% | 24%
deployment/solution-assistant/src0% | 0% | 41% | 40% | 18%
source/sagemaker/baselines0% | 0% | 0% | 66% | 33%
source/sagemaker/data-preprocessing0% | 0% | 0% | 76% | 23%
source/sagemaker/sagemaker_graph_fraud_detection0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run_modelling_job()
in source/lambda/graph-modelling/index.py
84 2 12
def run_preprocessing_job()
in source/lambda/data-preprocessing/index.py
68 1 7
def get_model()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/train_dgl_mxnet_entry_point.py
52 7 6
def parse_args()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/estimator_fns.py
39 1 0
def construct_graph()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/graph.py
34 8 5
def read_edges()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/data.py
34 9 2
def log_stream()
in source/sagemaker/sagemaker_graph_fraud_detection/container_build/logs.py
32 6 4
def __init__()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/mxnet.py
28 3 12
def __init__()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/pytorch.py
27 2 12
def delete_ecr_images()
in deployment/solution-assistant/src/lambda_function.py
27 4 1
def train()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/train_dgl_mxnet_entry_point.py
25 4 19
def get_metrics()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/utils.py
22 4 5
def parse_edgelist()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/data.py
21 7 5
def train()
in source/sagemaker/baselines/mlp_fraud_entry_point.py
18 3 5
def __init__()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/pytorch.py
17 2 9
def __init__()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/mxnet.py
17 2 9
def get_features()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/data.py
17 3 2
def verify_modelling_inputs()
in source/lambda/graph-modelling/index.py
16 6 1
def load_data()
in source/sagemaker/data-preprocessing/graph_data_preprocessor.py
16 2 5
def __init__()
in source/sagemaker/sagemaker_graph_fraud_detection/dgl_fraud_detection/model/pytorch.py
16 2 8