aws-samples / aws-healthcare-lifescience-ai-ml-sample-notebooks
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 11 units with 113 lines of code in units (22.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (23 lines of code)
    • 3 small units (45 lines of code)
    • 7 very small units (45 lines of code)
0% | 0% | 20% | 39% | 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% | 20% | 39% | 39%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
AI_ML_services_workshop_information/lambda_code0% | 0% | 32% | 39% | 28%
Classify_Medical_Specialty_NLP_Huggingface_Transformers0% | 0% | 0% | 100% | 0%
Sagemaker_Pipelines_Automated_Retraining0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def call_comprehehend_medical()
in workshops/AI_ML_services_workshop_information/lambda_code/ai_ml_services_lambda.py
23 5 2
def get_dependencies()
in workshops/Classify_Medical_Specialty_NLP_Huggingface_Transformers/get_dependencies.py
17 3 0
def lambda_handler()
in workshops/AI_ML_services_workshop_information/lambda_code/ai_ml_services_lambda.py
15 1 2
def call_textract()
in workshops/AI_ML_services_workshop_information/lambda_code/ai_ml_services_lambda.py
13 3 2
def put_file_in_s3()
in workshops/AI_ML_services_workshop_information/lambda_code/ai_ml_services_lambda.py
9 1 3
def kick_off_sagemaker_pipeline()
in workshops/Sagemaker_Pipelines_Automated_Retraining/kick_off_pipeline_lambda.py
9 1 2
def lambda_handler()
in workshops/Sagemaker_Pipelines_Automated_Retraining/kick_off_pipeline_lambda.py
8 1 2
def read_in_file_from_s3()
in workshops/AI_ML_services_workshop_information/lambda_code/ai_ml_services_lambda.py
6 1 2
def call_comprehend()
in workshops/AI_ML_services_workshop_information/lambda_code/ai_ml_services_lambda.py
5 1 1
def read_in_file_from_s3()
in workshops/Sagemaker_Pipelines_Automated_Retraining/kick_off_pipeline_lambda.py
5 1 2
def convert_to_s3uri()
in workshops/Sagemaker_Pipelines_Automated_Retraining/kick_off_pipeline_lambda.py
3 1 2