aws-solutions / mlops-workload-orchestrator
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 242 units with 3,572 lines of code in units (62.8% of code).
    • 4 very long units (781 lines of code)
    • 8 long units (544 lines of code)
    • 19 medium size units (567 lines of code)
    • 55 small units (769 lines of code)
    • 156 very small units (911 lines of code)
21% | 15% | 15% | 21% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py21% | 15% | 15% | 21% | 25%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/lib/blueprints/byom50% | 23% | 24% | 2% | 0%
source/lib96% | 0% | 0% | 0% | 3%
source/lib/blueprints/byom/pipeline_definitions0% | 9% | 14% | 32% | 43%
source/lambdas/pipeline_orchestration0% | 44% | 6% | 17% | 31%
source/lib/blueprints/byom/lambdas0% | 18% | 29% | 26% | 25%
source/lambdas/pipeline_orchestration/shared0% | 0% | 0% | 71% | 28%
source/lambdas/solution_helper0% | 0% | 0% | 76% | 23%
source/lambdas/custom_resource0% | 0% | 0% | 61% | 38%
source0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in source/lib/mlops_orchestrator_stack.py
354 8 6
def __init__()
in source/lib/blueprints/byom/multi_account_codepipeline.py
201 2 4
def __init__()
in source/lib/blueprints/byom/realtime_inference_pipeline.py
121 3 4
def __init__()
in source/lib/blueprints/byom/byom_batch_pipeline.py
105 1 4
def build_action()
in source/lib/blueprints/byom/pipeline_definitions/build_actions.py
81 2 4
def get_required_keys()
in source/lambdas/pipeline_orchestration/lambda_helpers.py
75 16 3
def __init__()
in source/lib/blueprints/byom/single_account_codepipeline.py
73 2 4
def handler()
in source/lib/blueprints/byom/lambdas/create_baseline_job/main.py
73 21 2
def __init__()
in source/lib/blueprints/byom/byom_custom_algorithm_image_builder.py
67 1 4
def get_template_parameters()
in source/lambdas/pipeline_orchestration/lambda_helpers.py
60 10 4
def _add_model_quality_resources()
in source/lib/blueprints/byom/model_monitor.py
59 12 1
def sagemaker_monitor_policy_statement()
in source/lib/blueprints/byom/pipeline_definitions/iam_policies.py
56 1 4
def __init__()
in source/lib/blueprints/byom/model_monitor.py
50 6 5
def _add_model_bias_explainability_extra_attributes()
in source/lib/blueprints/byom/model_monitor.py
46 3 1
def _create_stack_outputs()
in source/lib/blueprints/byom/model_monitor.py
42 1 1
def lambda_handler()
in source/lib/blueprints/byom/lambdas/create_update_cf_stackset/main.py
39 6 2
def handler()
in source/lib/blueprints/byom/lambdas/batch_transform/main.py
33 4 2
def add_logs_policy()
in source/lib/blueprints/byom/pipeline_definitions/helpers.py
31 1 1
def sagemaker_policy_statement()
in source/lib/blueprints/byom/pipeline_definitions/iam_policies.py
31 7 3
def suppress_cloudformation_action()
in source/lib/blueprints/byom/pipeline_definitions/helpers.py
28 1 0