awslabs / sagemaker-churn-prediction-text
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 27 units with 301 lines of code in units (21.2% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (61 lines of code)
    • 2 medium size units (73 lines of code)
    • 5 small units (80 lines of code)
    • 19 very small units (87 lines of code)
0% | 20% | 24% | 26% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 20% | 24% | 26% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
sagemaker_notebook_instance/containers/model0% | 27% | 32% | 9% | 30%
cloudformation/solution-assistant/src0% | 0% | 0% | 83% | 16%
sagemaker_notebook_instance/package/package0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def train_fn()
in sagemaker_notebook_instance/containers/model/entry_point.py
61 3 1
def parse_args()
in sagemaker_notebook_instance/containers/model/entry_point.py
41 1 1
def predict_fn()
in sagemaker_notebook_instance/containers/model/entry_point.py
32 1 2
def model_fn()
in sagemaker_notebook_instance/containers/model/entry_point.py
20 1 1
def delete_sagemaker_endpoint_config()
in cloudformation/solution-assistant/src/lambda_function.py
18 3 1
def delete_sagemaker_endpoint()
in cloudformation/solution-assistant/src/lambda_function.py
16 3 1
def delete_sagemaker_model()
in cloudformation/solution-assistant/src/lambda_function.py
13 3 1
def delete_s3_objects()
in cloudformation/solution-assistant/src/lambda_function.py
13 2 1
def on_delete()
in cloudformation/solution-assistant/src/lambda_function.py
8 1 2
def load_feature_names()
in sagemaker_notebook_instance/containers/model/entry_point.py
7 1 1
def get_current_folder()
in sagemaker_notebook_instance/package/package/utils.py
7 4 1
def log_cross_val_auc()
in sagemaker_notebook_instance/containers/model/entry_point.py
6 1 5
def transform()
in sagemaker_notebook_instance/containers/model/entry_point.py
6 2 2
def input_fn()
in sagemaker_notebook_instance/containers/model/entry_point.py
6 1 2
def output_fn()
in sagemaker_notebook_instance/containers/model/entry_point.py
6 1 2
def log_auc()
in sagemaker_notebook_instance/containers/model/entry_point.py
5 1 4
def load_data()
in sagemaker_notebook_instance/containers/model/entry_point.py
5 2 2
def extract_features()
in sagemaker_notebook_instance/containers/model/entry_point.py
5 1 0
def save_feature_names()
in sagemaker_notebook_instance/containers/model/entry_point.py
5 1 0
def extract_labels()
in sagemaker_notebook_instance/containers/model/entry_point.py
3 1 0