awslabs / sagemaker-deep-demand-forecast
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 34 units with 320 lines of code in units (29.0% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (80 lines of code)
    • 8 small units (113 lines of code)
    • 23 very small units (127 lines of code)
0% | 0% | 25% | 35% | 39%
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% | 35% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/container_build0% | 0% | 57% | 0% | 42%
cloudformation/solution-assistant/src0% | 0% | 27% | 30% | 41%
src/deep_demand_forecast0% | 0% | 18% | 60% | 21%
src/preprocess0% | 0% | 0% | 31% | 68%
scripts0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def log_stream()
in src/container_build/logs.py
32 6 4
def delete_ecr_images()
in cloudformation/solution-assistant/src/lambda_fn.py
27 4 1
def transform_fn()
in src/deep_demand_forecast/inference.py
21 1 4
def create_data_viz()
in src/deep_demand_forecast/monitor.py
20 1 5
def delete_sagemaker_endpoint_config()
in cloudformation/solution-assistant/src/lambda_fn.py
16 3 1
def train()
in src/deep_demand_forecast/train.py
15 1 0
def apply()
in src/preprocess/preprocess.py
14 2 1
def on_delete()
in cloudformation/solution-assistant/src/lambda_fn.py
14 2 2
def multivar_df()
in src/deep_demand_forecast/monitor.py
12 4 1
def load_multivariate_datasets()
in src/deep_demand_forecast/data.py
11 2 1
def prepare_data()
in src/deep_demand_forecast/monitor.py
11 1 1
def load_dataset()
in src/preprocess/data_preprocessor.py
10 1 2
def _wait_for_build()
in src/container_build/container_build.py
10 2 3
def delete_sagemaker_endpoint()
in cloudformation/solution-assistant/src/lambda_fn.py
10 3 1
def delete_sagemaker_model()
in cloudformation/solution-assistant/src/lambda_fn.py
10 3 1
def main()
in src/preprocess/get_base_image.py
9 1 4
def str2bool()
in src/deep_demand_forecast/utils.py
9 4 1
def set_kernel_spec()
in scripts/set_kernelspec.py
9 2 3
def build()
in src/container_build/container_build.py
7 2 2
def delete_s3_objects()
in cloudformation/solution-assistant/src/lambda_fn.py
7 2 1