aws-samples / automl-blueprint
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 97 units with 1,056 lines of code in units (59.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (56 lines of code)
    • 11 medium size units (375 lines of code)
    • 21 small units (305 lines of code)
    • 64 very small units (320 lines of code)
0% | 5% | 35% | 28% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 5% | 35% | 28% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
notebook/utils0% | 14% | 17% | 29% | 38%
code/workflow/implementations/autopilot0% | 0% | 46% | 28% | 25%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run()
in notebook/utils/wf.py
56 14 3
def get_config()
in code/workflow/implementations/autopilot/bp_init_stage.py
49 6 2
def create_clarify_bias_job()
in code/workflow/implementations/autopilot/bp_bias_analysis_stage.py
48 1 1
def _monitor_parallel_process()
in notebook/utils/wf.py
43 11 4
def create_clarify_xai_job()
in code/workflow/implementations/autopilot/bp_xai_analysis_stage.py
38 1 1
def generate_autopilot_config()
in code/workflow/implementations/autopilot/bp_automl_stage.py
34 3 3
def get_config()
in code/workflow/implementations/autopilot/bp_init_stage.py
30 2 1
def get_data_prep_container_uri()
in code/workflow/implementations/autopilot/bp_init_stage.py
29 2 2
def create_batch_predictions_job()
in code/workflow/implementations/autopilot/bp_error_analysis_stage.py
28 2 1
def monitor_status()
in code/workflow/implementations/autopilot/bp_automl_stage.py
27 5 4
def get_automl_job_baseline()
in notebook/utils/trust.py
27 10 4
def run_sm_autopilot()
in code/workflow/implementations/autopilot/bp_automl_stage.py
22 4 4
def create_merged_dataset()
in code/workflow/implementations/autopilot/bp_bias_analysis_stage.py
20 4 3
def copy_sample_flow_to_local()
in notebook/utils/prep.py
20 4 2
def display_interactive_cm()
in notebook/utils/trust.py
19 4 5
def create_processing_inputs()
in code/workflow/implementations/autopilot/bp_init_stage.py
18 6 4
def lambda_handler()
in code/workflow/implementations/autopilot/bp_model_registration_stage.py
17 2 2
def create_athena_processing_input()
in code/workflow/implementations/autopilot/bp_init_stage.py
16 1 4
def create_redshift_processing_input()
in code/workflow/implementations/autopilot/bp_init_stage.py
15 1 4
def get_inspector()
in notebook/utils/trust.py
15 4 2