aws-samples / sagemaker-cv-preprocessing-training-performance
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 7 units with 323 lines of code in units (84.1% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (136 lines of code)
    • 5 medium size units (187 lines of code)
    • 0 small units (0 lines of code)
    • 0 very small units (0 lines of code)
0% | 42% | 57% | 0% | 0%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 42% | 57% | 0% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 56% | 43% | 0% | 0%
ROOT0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 7 longest units
Unit# linesMcCabe index# params
def training()
in src/sm_augmentation_train-script.py
81 20 1
def run_training_epochs()
in src/sm_augmentation_train-script.py
55 18 8
def get_sys_metric()
in util_debugger.py
46 5 3
def augmentation_dali()
in src/sm_augmentation_train-script.py
44 4 8
def aug_exp_train()
in util_train.py
38 4 6
def augmentation_pytorch()
in src/sm_augmentation_train-script.py
32 7 6
def create_dali_pipeline()
in src/sm_augmentation_train-script.py
27 5 8